How many object of the Web Service class will be created?

2011-12-07 Thread emotional stability
I create one web service  and deploying on the tomcat with axis2.

But I want to know how many objects of the my Web service class will be
created.

When  the the web service is called from outside firstly,  the object of my
web service class is created? When will this object of my web service
class will be deleted?

I use the statement  Runtime.getRuntime().addShutdownHook(new  Thread()
***)

to delete this objectbut  I want to know when this addShutdownHook
statement  will be called


thanks


Re: How many object of the Web Service class will be created?

2011-12-07 Thread Pid *
On 7 Dec 2011, at 10:17, emotional stability
emotionalstabilitysl...@gmail.com wrote:

 I create one web service  and deploying on the tomcat with axis2.

Exact OS, Java, Tomcat versions?


 But I want to know how many objects of the my Web service class will be
 created.

Why?


 When  the the web service is called from outside firstly,  the object of my
 web service class is created? When will this object of my web service
 class will be deleted?

 I use the statement  Runtime.getRuntime().addShutdownHook(new  Thread()
 ***)

Err, why?


 to delete this objectbut  I want to know when this addShutdownHook
 statement  will be called

Same as all shutdown hooks: when the JVM stops running - in this case,
Tomcat shutdown.


p

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Re: How many object of the Web Service class will be created?

2011-12-07 Thread EmotionalStabilitySlave
Thanks for your reply.

Please see my  comment.


2011-12-07 



EmotionalStabilitySlave 



发件人: Pid * 
发送时间: 2011-12-07  21:50:19 
收件人: Tomcat Users List 
抄送: 
主题: Re: How many object of the Web Service class will be created? 
 
On 7 Dec 2011, at 10:17, emotional stability
emotionalstabilitysl...@gmail.com wrote:
 I create one web service  and deploying on the tomcat with axis2.
Exact OS, Java, Tomcat versions?

Windows 7   jdk-6u21-windows-i586tomcat 6.0

 But I want to know how many objects of the my Web service class will be
 created.
Why?

In my web service,  one object will create one network connection,  so  I need 
to know  how many network connections will exists.
I guess that  if  last  web service  calling is not return,  the tomcat will 
create a new web service object?


 When  the the web service is called from outside firstly,  the object of my
 web service class is created? When will this object of my web service
 class will be deleted?

 I use the statement  Runtime.getRuntime().addShutdownHook(new  Thread()
 ***)
Err, why?

I  need know  when the network connection will be close.

 to delete this objectbut  I want to know when this addShutdownHook
 statement  will be called
Same as all shutdown hooks: when the JVM stops running - in this case,
Tomcat shutdown.
p
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


Re: How many object of the Web Service class will be created?

2011-12-07 Thread Pid
On 07/12/2011 15:43, EmotionalStabilitySlave wrote:
 Thanks for your reply.
 
 Please see my  comment.
 
 
 2011-12-07 
 
 
 
 EmotionalStabilitySlave 
 
 
 
 发件人: Pid * 
 发送时间: 2011-12-07  21:50:19 
 收件人: Tomcat Users List 
 抄送: 
 主题: Re: How many object of the Web Service class will be created? 
  
 On 7 Dec 2011, at 10:17, emotional stability
 emotionalstabilitysl...@gmail.com wrote:
 I create one web service  and deploying on the tomcat with axis2.
 Exact OS, Java, Tomcat versions?
 
 Windows 7   jdk-6u21-windows-i586tomcat 6.0
 
 But I want to know how many objects of the my Web service class will be
 created.
 Why?
 
 In my web service,  one object will create one network connection,  so  I 
 need to know  how many network connections will exists.
 I guess that  if  last  web service  calling is not return,  the tomcat will 
 create a new web service object?

Network connection to what?


p


 When  the the web service is called from outside firstly,  the object of my
 web service class is created? When will this object of my web service
 class will be deleted?

 I use the statement  Runtime.getRuntime().addShutdownHook(new  Thread()
 ***)
 Err, why?
 
 I  need know  when the network connection will be close.




 to delete this objectbut  I want to know when this addShutdownHook
 statement  will be called
 Same as all shutdown hooks: when the JVM stops running - in this case,
 Tomcat shutdown.
 p
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature