| | |
SOAP call constructor each time
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Nov 2006
Posts: 2
Reputation:
Solved Threads: 0
Hi,
I am running a webapp in Tomcat 5.0 with Axis 1.4
My web app loads on startup.
When I make a SOAP call to the webapp (which is a servlet) it takes a new instance of the servlet instead of the original servlet that is already running.
The wsdd file is deployed using the Axis AdminClient.
Is this a setup problem, or is that the way that Axis Soap works?
I am happy to post the relevant code but I'm ot sure which part of the code is the problem...
Thanks in advance.
I am running a webapp in Tomcat 5.0 with Axis 1.4
My web app loads on startup.
When I make a SOAP call to the webapp (which is a servlet) it takes a new instance of the servlet instead of the original servlet that is already running.
The wsdd file is deployed using the Axis AdminClient.
Is this a setup problem, or is that the way that Axis Soap works?
I am happy to post the relevant code but I'm ot sure which part of the code is the problem...
Thanks in advance.
Are you sure it's calling the servlet constructor?
That would be really weird.
Remember that your SOAP service classes are NOT servlets (or at least not used as such by the SOAP processes) and are indeed most likely initialised one for each request.
Nothing weird about that (though a SOAP stack I guess might decide to cache them for performance reasons, at the cost of increased complexity and memory requirements).
That would be really weird.
Remember that your SOAP service classes are NOT servlets (or at least not used as such by the SOAP processes) and are indeed most likely initialised one for each request.
Nothing weird about that (though a SOAP stack I guess might decide to cache them for performance reasons, at the cost of increased complexity and memory requirements).
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
•
•
Join Date: Nov 2006
Posts: 2
Reputation:
Solved Threads: 0
Hey jwenting,
Thanks for the reply.
So just to clarify.
I have a servlet webapp that initialises variables that are constantly updated. I want to update these variables directly through remote SOAP requests.
Is it possible to access an existing method of servlet that is already running without calling a new instance of the program?
hence updating the variable...
OR
Is the only way to update these variables to pass a soap request to the server which would instantiate a new class and then I could update the variables as session variables and access these from the servlet?
Any reply would be helpfull as I need to persue either one way or the other.
Thanks.
Thanks for the reply.
So just to clarify.
I have a servlet webapp that initialises variables that are constantly updated. I want to update these variables directly through remote SOAP requests.
Is it possible to access an existing method of servlet that is already running without calling a new instance of the program?
hence updating the variable...
OR
Is the only way to update these variables to pass a soap request to the server which would instantiate a new class and then I could update the variables as session variables and access these from the servlet?
Any reply would be helpfull as I need to persue either one way or the other.
Thanks.
•
•
•
•
Are you sure it's calling the servlet constructor?
That would be really weird.
Remember that your SOAP service classes are NOT servlets (or at least not used as such by the SOAP processes) and are indeed most likely initialised one for each request.
Nothing weird about that (though a SOAP stack I guess might decide to cache them for performance reasons, at the cost of increased complexity and memory requirements).
You should never have a servlet maintain state outside of a specific HTTP session!
It's highly dangerous, unreliable, and unpredictable.
And what you're trying to do is having sessions in one web application (the SOAP stack) directly influence another web application, which is barred (and rightly so) for security reasons by every well designed application server.
You'll have to find some other way for them to communicate. Most likely that will have to be a database of some sorts.
It's highly dangerous, unreliable, and unpredictable.
And what you're trying to do is having sessions in one web application (the SOAP stack) directly influence another web application, which is barred (and rightly so) for security reasons by every well designed application server.
You'll have to find some other way for them to communicate. Most likely that will have to be a database of some sorts.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
![]() |
Similar Threads
- constructor problem (C++)
- How to call constructor for descendant of TObject ? (C++)
- C++ BASICS ==> Pointers, Call by Reference/Value, Inheritance, Functions & Arrays (C++)
Other Threads in the Java Forum
- Previous Thread: help needed
- Next Thread: Anyone mind helping out a stuck noob?
| Thread Tools | Search this Thread |
android api applet application array arrays automation awt bidirectional binary birt bluetooth businessintelligence busy_handler(null) chat class classes client code columns component constructor database designadrawingapplicationusingjavajslider draw eclipse editor error errors event eventlistener exception expand fractal game givemetehcodez graphics gui guidancer html ide image inetaddress input integer intellij j2me java javafx javamicroeditionuseofmotionsensor javaprojects jme jni jpanel jtree julia link linux list loop map method methods mobile mobiledevelopmentcreatejar myaggfun netbeans newbie oracle parsing plazmic print problem program programming project recursion scanner screen server set sharepoint size smart sms smsspam sort sortedmaps sql string subclass support swing threads time tree unlimited utility webservices windows






