Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Object Instantiation During Compliation and Deployment

 
Parag Pattankar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

With the basic concept of Static binding and run-time binding,
you can profile you application Jprofiler to understand it more.
 
Parag Pattankar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Parag Pattankar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic