Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Performance and the fly likes Object Instantiation During Compliation and Deployment Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Performance
Reply Bookmark "Object Instantiation During Compliation and Deployment" Watch "Object Instantiation During Compliation and Deployment" New topic
Author

Object Instantiation During Compliation and Deployment

Parag Pattankar
Greenhorn

Joined: Dec 11, 2009
Posts: 3
Hi,
Can someone please explain how does the object instantiation during Compliation and deployment of Application on the App Server affect the performance of an application?
Pallu Sagar
Greenhorn

Joined: Dec 04, 2009
Posts: 16
Hello,

With the basic concept of Static binding and run-time binding,
you can profile you application Jprofiler to understand it more.


-Sagar
Parag Pattankar
Greenhorn

Joined: Dec 11, 2009
Posts: 3
Hi Sagar,
Thanks for your reply.
I am trying to understand how does JVM/CLR behave during compliation and deployment. Many times we observe that the first request from the client takes a little longer to be serviced by the App Server than the subsequent requests. This is mainly due to numerous reasons like Caching, DB getting indexed or etc. My question may look very vague, but my intention is to understand what happens inside JVM or CLR during the first request from the Client on the App server.

Thank You.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5533

Parag, welcome to Java Ranch!

Most app servers (you never said which one!) do lazy loading of database connections. Thus no connections are made until the first request needs a connection,at which point the minimum number of specified connections are created in a pool and one is given to the requestor.

Another significant startup issue is that any JSPs (or similar web page building mechanisms) have to have their Java code generated and compiled.


JBoss In Action
Parag Pattankar
Greenhorn

Joined: Dec 11, 2009
Posts: 3
Hello Peter,
Thank you for your reply.
I see your point of lazy loading by the App/DB Servers. I have observed this First hit delay in App Servers like JBOSS and IIS 6.
Is there any way the required number of connection be indexed or cached over the App/DB Server layer where the Client gets the connection instantly?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5533

In JBoss AS you can write a startup mbean that asks for a connection, thus causing the minimal number of connections to be created during app server startup.

I would give you a link to the startup mbean entry in the JBoss wiki, but it appears to be down at this time.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Object Instantiation During Compliation and Deployment
 
Similar Threads
Question on Generics
diff betwn method and constructer
Native_Stderr.log
StackOverFlow Exception help
Limit of JSP page to Compile