How does JNLP work

zolf
zolf used Ask the Experts™
on

Hello there,

i want to know when i client machine connects to a server and then runs a JNLP application which uses swing,hibernate and mssql db.what things take place.in the jnp file i have around 15 jar files and the application jar file itself.please give me detail explanation.appreciate your help.

cheers
zolf
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016

Commented:
It's Java Web Start (associated in the OS with .jnlp) that knows what to do with a jnlp file, basically getting its resources and then running the app
Top Expert 2016

Commented:
Mick BarryJava Developer
Top Expert 2010

Commented:
the jnlp just defines what the app needs to execute.
the jnlp will get downloaded and read on the client. Any jars or resources specified in the jnlp will then be downloaded
OWASP: Avoiding Hacker Tricks

Learn to build secure applications from the mindset of the hacker and avoid being exploited.

Mick BarryJava Developer
Top Expert 2010

Commented:
deployment is the main thing you need to be concerned with and is well covered here
http://java.sun.com/developer/technicalArticles/Programming/jnlp/

Author

Commented:

>>the jnlp will get downloaded and read on the client. Any jars or resources specified in the jnlp will >>then be downloaded

where does it get downloaded.
do you mean all the jar files mentioned inthe jnlp file gets downloaded on the client machine.
what happens when the java application starts running on the clinet machine.i mean when client opens a frame does the GUI gets dowloaded from the server or it is on the client machine itself.
also does data only gets exchnged between the client and server
Mick BarryJava Developer
Top Expert 2010

Commented:
> then runs a JNLP application

theres actiually no such thing as a jnlp application, its just a java application no different to one you would run locally.
The jnlp file is simply downloaded and read to determine what java application needs to be run and what resources/jars need to be downloaded (and a variety of other details it uses to setup the sandbox that the application runs in)
Mick BarryJava Developer
Top Expert 2010

Commented:
> do you mean all the jar files mentioned inthe jnlp file gets downloaded on the client machine.

yes, it cannot use a jar unless it has been downloaded

> what happens when the java application starts running on the clinet machine.i mean when client opens a frame does the GUI gets dowloaded from the server or it is on the client machine itself.

guis do not get downloaded, jars do. the same as what happens when you run it locally.

> also does data only gets exchnged between the client and server

typically yes

Author

Commented:

>>deployment is the main thing you need to be concerned with and is well covered here

my application is in production but then problem i am facing is when the user enters the ip address of the server in its brower after opening a vpn to the server.the download of the jnlp starts and takes lot of time around 10-15 minutes.sometimes it gets disconnected 2-3 times.what could be the reason?
when i get disconnected does it start from beginning or starts from where it disconnected.?
everytime i update my java application on the server does only my jar file gets downloaded or all the other third party jar files also gets downloaded.
when i delete the cache from the Control Panel-Java what happens.
Top Expert 2016

Commented:
>> or it is on the client machine itself.
Yes

>>also does data only gets exchnged between the client and server
Server->Client
Mick BarryJava Developer
Top Expert 2010

Commented:
check your logs, sounds like it is downloading all the jars. How much does it have to download?
Top Expert 2016
Commented:
>>... the user enters the ip address of the server in its brower after opening a vpn to the server.the download of the jnlp starts and takes lot of time around 10-15 minutes.sometimes it gets disconnected 2-3 times.what could be the reason?

The issue of VPN is a non-issue. Web Start is web-server based, so in that sense it's no different to a web page. No VPN is needed. What *is* needed is a web server on the server

Author

Commented:

>>where does it get downloaded.
Mick BarryJava Developer
Top Expert 2010

Commented:
downloads the jars from the server to the client (cache)

Author

Commented:

>>The issue of VPN is a non-issue. Web Start is web-server based, so in that sense it's no different to a web page. No VPN is needed. What *is* needed is a web server on the server

you mean i do not need to do a VPN.are you sure.
the IP the user enter at present is 192.168.0.1.

Author

Commented:

>>check your logs, sounds like it is downloading all the jars. How much does it have to download?

where.do you mean the jnlp Console.

How much does it have to download?
around 18MB.my java application jar is around 3MB
Top Expert 2016
Commented:
>>you mean i do not need to do a VPN.are you sure.

Certain

>>the IP the user enter at present is 192.168.0.1.

That's a private address (normally on the same network)
Top Expert 2016

Commented:
>>That's a private address (normally on the same network)

(A *local* address)

Author

Commented:

is this where the jars gets downloaded
111.gif
Top Expert 2016

Commented:
Yes

Author

Commented:

>>the IP the user enter at present is 192.168.0.1.
>>That's a private address (normally on the same network)

yes that is the reason why the clients have to vpn to use the priv. addr.
could this be the reason why it is slow
Mick BarryJava Developer
Top Expert 2010

Commented:
> could this be the reason why it is slow

check the java console during startup to determine where the time is spent
otherwise you'll just waste your time guessing

Author

Commented:

but i dont see the jar files i use in there.

this is my jnlp file

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://192.168.0.1">
<information>
  <title></title>
  <vendor></vendor>
  <homepage href="/me" />
  <description></description>
</information>
<offline-allowed/>
<security>
  <all-permissions/>
</security>
<resources>
  <j2se version="1.2+" initial-heap-size="256m" max-heap-size="1024m"/>
  <jar href="erp.jar"/>
  <jar href="antlr-2.7.6.jar"/>
  <jar href="calendar-0.10.jar"/>
  <jar href="commons-beanutils-1.8.0.jar"/>
  <jar href="commons-collections-3.2.jar"/>
  <jar href="commons-digester-1.8.jar"/>
  <jar href="commons-logging-1.1.jar"/>
  <jar href="dom4j-1.6.1.jar"/>
  <jar href="forms-1.2.1.jar"/>
  <jar href="hibernate3.jar"/>
  <jar href="iText-2.1.3.jar"/>
  <jar href="jasperreports-3.5.0.jar"/>
  <jar href="javassist-3.4.GA.jar"/>
  <jar href="jcalendar-1.3.2.jar"/>
  <jar href="jta-1.1.jar"/>
  <jar href="log4j-1.2.15.jar"/>
  <jar href="looks-2.2.0.jar"/>
  <jar href="slf4j-api-1.5.6.jar"/>
  <jar href="slf4j-log4j12-1.5.6.jar"/>
  <jar href="sqljdbc.jar"/>
  <jar href="validation-2.0.1.jar"/>
  <jar href="substance.jar"/>
  <jar href="substance-swingx.jar"/>
  <jar href="substance-tools.jar"/>
  <jar href="swingx.jar"/>
  <jar href="jcommon-1.0.15.jar"/>
  <jar href="jfreechart-1.0.12.jar"/>
  <jar href="jtds-1.2.2.jar"/>
</resources>
<application-desc main-class="com.MainFormX" />
</jnlp>

Author

Commented:

this is the java console i copied after opening one frame.which took about 3 min


12:31:41,478 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : classic factory
12:32:49,614 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : Opening session at
12:32:49,615 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.hibernate.HibernateSessionFactory.openSession(HibernateSessionFactory.java:97)
12:32:49,615 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : com.MainFormX.<init>(MainFormX.java:98)
12:32:49,616 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : com.MainFormX$1.run(MainFormX.java:322)
12:32:49,616 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : java.awt.event.InvocationEvent.dispatch(Unknown Source)
12:32:49,616 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : java.awt.EventQueue.dispatchEvent(Unknown Source)
12:32:49,616 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
12:32:49,616 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : Closing session at
12:32:49,617 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.hibernate.HibernateSessionFactory.closeSession(HibernateSessionFactory.java:241)
12:32:49,617 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : com.MainFormX.<init>(MainFormX.java:99)
12:32:49,617 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : com.MainFormX$1.run(MainFormX.java:322)
12:32:49,617 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : java.awt.event.InvocationEvent.dispatch(Unknown Source)
12:32:49,617 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : java.awt.EventQueue.dispatchEvent(Unknown Source)
12:32:49,617 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
Trace level set to 0: none ... completed.
Trace level set to 0: none ... completed.
Trace level set to 5: all ... completed.
Trace level set to 5: all ... completed.
12:33:50,814 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : Opening session at
12:33:50,816 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.hibernate.HibernateSessionFactory.openSession(HibernateSessionFactory.java:97)
12:33:50,817 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.component.SectionComponentSet.initParameterCB(SectionComponentSet.java:135)
12:33:50,820 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.component.SectionComponentSet.<init>(SectionComponentSet.java:117)
12:33:50,821 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.CustomScrollInternalFrame.<init>(CustomScrollInternalFrame.java:108)
12:33:50,822 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.CustomScrollInternalFrame.<init>(CustomScrollInternalFrame.java:87)
12:33:50,823 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.sales.OrderInternalFrame.<init>(OrderInternalFrame.java:149)
12:33:51,234 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : Closing session at
12:33:51,238 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.hibernate.HibernateSessionFactory.closeSession(HibernateSessionFactory.java:241)
12:33:51,238 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.component.SectionComponentSet.initParameterCB(SectionComponentSet.java:159)
12:33:51,239 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.component.SectionComponentSet.<init>(SectionComponentSet.java:117)
12:33:51,240 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.CustomScrollInternalFrame.<init>(CustomScrollInternalFrame.java:108)
12:33:51,241 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.CustomScrollInternalFrame.<init>(CustomScrollInternalFrame.java:87)
12:33:51,241 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.sales.OrderInternalFrame.<init>(OrderInternalFrame.java:149)
12:33:51,569 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : Opening session at
12:33:51,570 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.hibernate.HibernateSessionFactory.openSession(HibernateSessionFactory.java:97)
12:33:51,571 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.CustomInternalFrame.openSession(CustomInternalFrame.java:155)
12:33:51,571 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.CustomScrollInternalFrame.initBranches(CustomScrollInternalFrame.java:176)
12:33:51,571 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.CustomScrollInternalFrame.<init>(CustomScrollInternalFrame.java:111)
12:33:51,572 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.CustomScrollInternalFrame.<init>(CustomScrollInternalFrame.java:87)
12:33:51,572 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.sales.OrderInternalFrame.<init>(OrderInternalFrame.java:149)
12:33:52,315 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : Closing session at
12:33:52,320 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.hibernate.HibernateSessionFactory.closeSession(HibernateSessionFactory.java:241)
12:33:52,320 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.CustomInternalFrame.closeSession(CustomInternalFrame.java:179)
12:33:52,321 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.CustomScrollInternalFrame.initBranches(CustomScrollInternalFrame.java:197)
12:33:52,321 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.CustomScrollInternalFrame.<init>(CustomScrollInternalFrame.java:111)
12:33:52,322 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.CustomScrollInternalFrame.<init>(CustomScrollInternalFrame.java:87)
12:33:52,322 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.sales.OrderInternalFrame.<init>(OrderInternalFrame.java:149)
security: JAVAWS AppPolicy Permission requested for: http://192.168.0.1/jcalendar-1.3.2.jar
security: Loading certificates from Deployment session certificate store
security: Loaded certificates from Deployment session certificate store
security: Loading certificates from Internet Explorer TrustedPublisher certificate store
security: Loaded certificates from Internet Explorer TrustedPublisher certificate store
security: Validate the certificate chain using CertPath API
security: Obtain certificate collection in Root CA certificate store
security: Obtain certificate collection in Root CA certificate store
security: No timestamping info available
security: Found jurisdiction list file
security: No need to checking trusted extension for this certificate
security: The CRL support is disabled
security: The OCSP support is disabled
security: Checking if certificate is in Deployment denied certificate store
security: Checking if certificate is in Deployment permanent certificate store
security: Checking if certificate is in Deployment permanent certificate store
12:33:53,049 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : Opening session at
12:33:53,049 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.hibernate.HibernateSessionFactory.openSession(HibernateSessionFactory.java:97)
12:33:53,050 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.erp.warehouse.WarehouseSubType.getWarehouses(WarehouseSubType.java:262)
12:33:53,050 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.sales.OrderInternalFrame.<init>(OrderInternalFrame.java:232)
12:33:53,051 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.FrameCommons.createOrderFrame(FrameCommons.java:963)
12:33:53,051 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : com.MainFormX$CustomMenuBar.actionPerformed(MainFormX.java:1325)
12:33:53,051 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
12:33:55,447 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : Closing session at
12:33:55,448 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.hibernate.HibernateSessionFactory.closeSession(HibernateSessionFactory.java:241)
12:33:55,449 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.erp.warehouse.WarehouseSubType.getWarehouses(WarehouseSubType.java:284)
12:33:55,450 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.sales.OrderInternalFrame.<init>(OrderInternalFrame.java:232)
12:33:55,450 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.FrameCommons.createOrderFrame(FrameCommons.java:963)
12:33:55,450 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : com.MainFormX$CustomMenuBar.actionPerformed(MainFormX.java:1325)
12:33:55,451 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
12:33:55,453 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : Opening session at
12:33:55,453 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.hibernate.HibernateSessionFactory.openSession(HibernateSessionFactory.java:97)
12:33:55,454 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.CustomInternalFrame.openSession(CustomInternalFrame.java:155)
12:33:55,454 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.sales.OrderInternalFrame.initProducts(OrderInternalFrame.java:793)
12:33:55,454 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.sales.OrderInternalFrame.<init>(OrderInternalFrame.java:234)
12:33:55,455 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.FrameCommons.createOrderFrame(FrameCommons.java:963)
12:33:55,455 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : com.MainFormX$CustomMenuBar.actionPerformed(MainFormX.java:1325)
12:33:59,117 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : Closing session at
12:33:59,117 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.hibernate.HibernateSessionFactory.closeSession(HibernateSessionFactory.java:241)
12:33:59,118 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.CustomInternalFrame.closeSession(CustomInternalFrame.java:179)
12:33:59,118 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.sales.OrderInternalFrame.initProducts(OrderInternalFrame.java:816)
12:33:59,119 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.sales.OrderInternalFrame.<init>(OrderInternalFrame.java:234)
12:33:59,119 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.FrameCommons.createOrderFrame(FrameCommons.java:963)
12:33:59,119 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : com.MainFormX$CustomMenuBar.actionPerformed(MainFormX.java:1325)
12:33:59,121 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : Opening session at
12:33:59,122 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.hibernate.HibernateSessionFactory.openSession(HibernateSessionFactory.java:97)
12:33:59,122 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.CustomInternalFrame.openSession(CustomInternalFrame.java:155)
12:33:59,122 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.sales.OrderInternalFrame.initCustomers(OrderInternalFrame.java:643)
12:33:59,123 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.sales.OrderInternalFrame.<init>(OrderInternalFrame.java:237)
12:33:59,123 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.FrameCommons.createOrderFrame(FrameCommons.java:963)
12:33:59,123 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : com.MainFormX$CustomMenuBar.actionPerformed(MainFormX.java:1325)
12:35:09,053 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : Closing session at
12:35:09,053 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.hibernate.HibernateSessionFactory.closeSession(HibernateSessionFactory.java:241)
12:35:09,054 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.CustomInternalFrame.closeSession(CustomInternalFrame.java:179)
12:35:09,054 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.sales.OrderInternalFrame.initCustomers(OrderInternalFrame.java:666)
12:35:09,055 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.sales.OrderInternalFrame.<init>(OrderInternalFrame.java:237)
12:35:09,055 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.FrameCommons.createOrderFrame(FrameCommons.java:963)
12:35:09,055 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : com.MainFormX$CustomMenuBar.actionPerformed(MainFormX.java:1325)
12:35:09,062 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : Opening session at
12:35:09,062 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.hibernate.HibernateSessionFactory.openSession(HibernateSessionFactory.java:97)
12:35:09,063 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.CustomInternalFrame.openSession(CustomInternalFrame.java:155)
12:35:09,063 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.sales.OrderInternalFrame.initVisitors(OrderInternalFrame.java:967)
12:35:09,064 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.sales.OrderInternalFrame.<init>(OrderInternalFrame.java:238)
12:35:09,064 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.FrameCommons.createOrderFrame(FrameCommons.java:963)
12:35:09,064 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : com.MainFormX$CustomMenuBar.actionPerformed(MainFormX.java:1325)
12:35:25,556 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : Closing session at
12:35:25,557 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.hibernate.HibernateSessionFactory.closeSession(HibernateSessionFactory.java:241)
12:35:25,557 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.CustomInternalFrame.closeSession(CustomInternalFrame.java:179)
12:35:25,558 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.sales.OrderInternalFrame.initVisitors(OrderInternalFrame.java:1002)
12:35:25,558 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.sales.OrderInternalFrame.<init>(OrderInternalFrame.java:238)
12:35:25,559 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.FrameCommons.createOrderFrame(FrameCommons.java:963)
12:35:25,559 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : com.MainFormX$CustomMenuBar.actionPerformed(MainFormX.java:1325)
12:35:25,778 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : Opening session at
12:35:25,779 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.hibernate.HibernateSessionFactory.openSession(HibernateSessionFactory.java:97)
12:35:25,779 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.CustomInternalFrame.openSession(CustomInternalFrame.java:155)
12:35:25,780 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.sales.OrderInternalFrame.initScrollValues(OrderInternalFrame.java:1095)
12:35:25,780 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.sales.OrderInternalFrame.<init>(OrderInternalFrame.java:499)
12:35:25,781 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : custom.java.swing.frames.FrameCommons.createOrderFrame(FrameCommons.java:963)
12:35:25,781 [AWT-EventQueue-0] DEBUG HibernateSessionFactory : com.MainFormX$CustomMenuBar.actionPerformed(MainFormX.java:1325)

Author

Commented:

where does the jar files which it downloads on the clinet machine gets saved.i cannot find it.please

Author

Commented:

please help
Top Expert 2016

Commented:
>>where does the jar files which it downloads on the clinet machine gets saved.i cannot find it.please

They should be where it showed in the graphic you attached

Author

Commented:

it is not in there.
Mick BarryJava Developer
Top Expert 2010
Commented:
Its in the cache as I posted earlier (it won't have the identical name as specified in the jnlp)
Top Expert 2016

Commented:
Well the easiest way is just to do a global file search
Mick BarryJava Developer
Top Expert 2010

Commented:
also check you're not pulling lots of data at startup, looks like you may be

Author

Commented:

>>Well the easiest way is just to do a global file search
what do you mean

>>also check you're not pulling lots of data at startup, looks like you may be
like what
Mick BarryJava Developer
Top Expert 2010
Commented:
like you are retrieving a lot of data from the database at startup

(also a global file search will not help you)

Author

Commented:

is it possible to update the client machine with new version of the appliction by cd or flsh drive instead of downloading it from the internet
Mick BarryJava Developer
Top Expert 2010
Commented:
no, jws is not designed for that mode of operation.
If you were doing that you just run the application directly from the CD.

Why are you using JWS in the 1st place?
Top Expert 2016

Commented:
>>is it possible to update the client machine with new version of the appliction by cd or flsh drive instead of downloading it from the internet

Yes. You would need to be running a web server on the flash disk

Author

Commented:

the cache is in here

C:\Users\Zolf\AppData\LocalLow\Sun\Java\Deployment\cache\6.0

it has so many folders they are empty(i opened some).
i can send you the folder if you want
333.gif
Top Expert 2016

Commented:
>>You would need to be running a web server on the flash disk

Although a problem could be that JWS would just see it as a different app

Author

Commented:

cant i just replace the jar file by hand which needs update
Mick BarryJava Developer
Top Expert 2010

Commented:
don't touch the cache, its not intended to be fiddled with :)
Top Expert 2016

Commented:
If they're empty then you're probably not looking in the right place. You need to do a global search on the main jar file, including hidden folders
Mick BarryJava Developer
Top Expert 2010

Commented:
> cant i just replace the jar file by hand which needs update

noooo (and why would you want to)

Author

Commented:

as you see in the jnlp file i posted above,i have many jar files.does all of these get downloaded on the clinet machine everytime it launches the application(jnlp file) or no
Mick BarryJava Developer
Top Expert 2010

Commented:
no it won't, thats what the cache is for :)

Author

Commented:

don't touch the cache, its not intended to be fiddled with :)
IC
Top Expert 2016

Commented:
JWS has a transparent update mechanism. It will get any newer jars from the server

Author

Commented:

no it won't, thats what the cache is for :)
you mean the jars wont be downloaded everything.but it will be downloaded only once the first time

Author

Commented:


JWS has a transparent update mechanism. It will get any newer jars from the server
IC

Author

Commented:

i am using hibernate in my application.could that be the reason for slowing down the application
Mick BarryJava Developer
Top Expert 2010

Commented:
it will only need to be downloaded after update
check how much data you load from database during startup
Top Expert 2016

Commented:
>>i am using hibernate in my application.could that be the reason for slowing down the application

Your app looks large. That should be a one time hit. It should be faster next time

Author

Commented:

>>check how much data you load from database during startup

how do i check this.please
Top Expert 2016

Commented:
There's also the overhead of starting the VM

Author

Commented:

>>There's also the overhead of starting the VM

what do you mean
Top Expert 2016

Commented:
A java vm takes a few second to start normally

Author

Commented:

guys please just tell me exactly where these jar files get downloaded on the client machine.appreciate your help.in the cache folder i have 63 folders and most are empty and i dont see any of the jars in there.
Mick BarryJava Developer
Top Expert 2010

Commented:
I already covered that earlier :) they are in the cache folder and you can't just go oin and manipulate it yourself. It is managed internally.
What exactly is it you are trying to do?

Author

Commented:

you see,i have implemented a java application using swing,hibernate,mssql server 2005 db.at the start the company was using it local lan and it was good.now they want remote users from othe rbranch to use the application.what i did was told them to create a vpn and then with Remote desktop connecction they conenct to the server and us ethe application.which solved the problem partly.but another problem i have is when they want to take printout it becomes a hassle becasue they are on the remote server and cannot take print locally.to solve this issue i made the users to connect via vpn and then in the browser type the server ip,but this takes a hell of a lot time to download the jnlp and also the frames open very slow.i am stuck totally to provide them with a solution.
i was thinking to swtich to linux thinking it will be much faster ,but i dont know.please help
Mick BarryJava Developer
Top Expert 2010

Commented:
from what you have said the problem has not with your jars as they will get cached.
Your problem appears more related to your database access, and the amount of data being loaded is what you should be investigating.

Author

Commented:

can you please tell me how can i solve this issue or start analzing the data
Mick BarryJava Developer
Top Expert 2010

Commented:
check what data is being loaded at startup, and add some timing logging to your code

Author

Commented:

but the problem is also there even after the application is loaded on the client machine.as you mentioned it is reated to db access.what is the solution to this problem.can you please give me some feedback on it
Mick BarryJava Developer
Top Expert 2010

Commented:
there is no magic solution sorry. you need to work out exactly what database access is slowing it down and find ways to reduce the amount of data pushed/pulled to/from server.

Its a problem with the architecture you are using. A web application for example does not have this issue as all the database access is handled on the server side.

Author

Commented:

cheers mate.

you mentioned "A web application for example does not have this issue as all the database access is handled on the server side."

you mean now what does it do.can you please explain
Mick BarryJava Developer
Top Expert 2010

Commented:
with a web application the client (browser) sends a http request to the server, the server receives that request and makes any db calls required to generate the response. The response (typically a html page) is then returned to the client.

Author

Commented:

thanks mate
in jnlp how does it work
Mick BarryJava Developer
Top Expert 2010
Commented:
as I explained in my first comment
it downloads the application, and executes it on the client
so any database access required will result in jdbc calls from client to the server

Author

Commented:

got it.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial