This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I place to class into axis and rename it to a .jws, and there is my web service.
When I look at my log files - it seems the contructor of my class is running for every request that is comming in!
That cant be right !? thats not how servlets works! I want only one instance of my class to be made, otherwise I think it will mess up my connection pooling. My DataSource is looked up in the constructor - I want one dataSource - many connections. Not each request getting its own istance of the class and therefore its own datasource!
PLEASE WATCH THIS VIDEO: <a href="http://www.glumbert.com/media/dolphin" target="_blank" rel="nofollow">http://www.glumbert.com/media/dolphin</a><br /> <br /><-- that video is no joke. Spread the word... this cant go on!!!<br /> <br />SCJP 1.4, SCBCD 1.3, SCWCD 1.4, SCMAD 1.0
Are you using Axis ? If yes it is possible to create a single instance of WS class. I have posted a link before in this forum so searching the forum will help.
Why would you expect it to work like a servlet? Like you said, it's a bean that gets exposed as web service. The Axis documentation does not mention anywhere what the lifecycle semantics are, but it does mention the various drawbacks the .jws approach has, which make it unsuitable for serious use. [ September 30, 2005: Message edited by: Ulf Dittmer ]
Why would you expect it to work like a servlet? Like you said, it's a bean that gets exposed as web service. The Axis documentation does not mention anywhere what the lifecycle semantics are, but it does mention the various drawbacks the .jws approach has, which make it unsuitable for serious use.
[ September 30, 2005: Message edited by: Ulf Dittmer ]
I think he wanted only one instance of the service class same as the servlet.
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: How many instances of web service class are created?