Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2006

Tip: Looking for answers? Try searching our database.

Related to Performace of URLConnection.getOutputStream

Thread view: 
Lucky - 31 May 2006 11:38 GMT
Hi Folks,

In my Java application, the application is sending HTTP + SOAP request
to JBoss server. My observation is that for the very first request for
obtaining OutputStream object, application takes much time. And the
subsequent requests from the application does not take time for
obtaining the OutputStream object.

###########################################################
HttpURLConnection httpConn = (HttpURLConnection) serviceURL
                .openConnection();
-------
-------
-------
OutputStream out = httpConn.getOutputStream();

#####################################################

Is there any reason behind this? Please let me know.

Regards,
Deepak
Matt Humphrey - 01 Jun 2006 19:30 GMT
> Hi Folks,
>
[quoted text clipped - 15 lines]
>
> Is there any reason behind this? Please let me know.

There are so many reasons for this that the standard advice for evaluating
performance is to be sure to ignore the first few requests.  The first time
JBoss encounters the request it must load the servlet classes and initialize
the servlet.  This only ever happens once.  For JSP pages, the page must be
compiled and then loaded.  There are usually lots of classes that have to be
brought in for the first request, so all this is normal.  Focus instead on
the performance of later requests.

Cheers,
Matt Humphrey matth@ivizNOSPAM.com http://www.iviz.com/


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.