|
Test webapp | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectadriani.webapp.services.ScopeService
public class ScopeService
Simple class used to verify how Axis2 handle persistence of the web services instances. This web service
can be invoked from the page test_scopeservice.jsp
many different times, and as long as the scope
is set to "request" the client will get a different object for each request.
Moreover, looking at the Tomcat console output, it's possibile to verify the FIRST INSTANCE of the
web service is never finalized. This because at startup Axis2 prepares a pool of all the available web services,
to improve performance, hence the first instance is always present.
Field Summary | |
---|---|
protected java.lang.String |
leadingName
The leading name of each message logged on the STDOUT. |
Constructor Summary | |
---|---|
ScopeService()
|
Method Summary | |
---|---|
void |
delay()
Used to delay the service response for about 1 second. |
void |
destroy(ServiceContext serviceContext)
This method should be called theoretically, but I have never seen it working. |
java.lang.String |
echoMessage(java.lang.String msg)
The method representing the operation offered by this service. |
void |
finalize()
Called by the Virtual Machine when this object is destroyed. |
long |
getThreadID()
Return the reference ID of the thread running this service. |
void |
init(ServiceContext serviceContext)
Called by Axis2 at startup. |
void |
setOperationContext(OperationContext operationContext)
This method should be called theoretically, but I have never seen it working. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String leadingName
Constructor Detail |
---|
public ScopeService()
Method Detail |
---|
public java.lang.String echoMessage(java.lang.String msg)
msg
- the string message used to produce the response message.public void init(ServiceContext serviceContext)
application
when this method is called
the ServiceContext
parameter contains a null MessageContext
.
serviceContext
- the service context handled by Axis2.public void delay()
test_scopeservice.jsp
,
but is's needed when testing the multi-threading behaviour.
See the test_concurrent.jsp
for details.
public void finalize()
finalize
in class java.lang.Object
public void destroy(ServiceContext serviceContext)
public void setOperationContext(OperationContext operationContext)
public long getThreadID()
|
Build 10/01/2013 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |