[JBossWS] - Re: out parameter
by oskar.carlstedt
Hi again!
Now I look at all these parts on a communication level. There might be a feature in JAXB to do all this state synchronization without your/my knowledge. I don't know. But the concept of web services does not support this kind of void feature where you change a value in your method "argument" - because there is no method or argument just an operation that accepts a message.
This is something you already know, but we take it from the beginning if there are other persons whoe are unsure about the concept of web services.
Web services, in this case SOAP, provide a stateless way to communicate with other components. You never know if these components are written in Java, .NET, Perl, C++ or whatever else. This is the whole point by using web services - You send a request message to a component and you get a response message in return.
Web services also use http as communication protocol. Http is a so called dead protocol, i.e. one request and then one response before the communication dies (we have something call keep alive to speed up things but that is just a way to keep the socket connection open).
To summarize, we have two stateless parts communicating with each other - or more correct one part (the client) asking the server for something by providing a message. The response is another message. The two parts don't know anything about each other more than what is exposed by the service contract (the WSDL file).
The question is, how can we provide the client with a new state on the server. Can it be exposed to the client in another way than by using a return statement? I don't think so.
Maybe JAXB can solve a void method by automatically map the contents of your request Java-object instance to the same instance as the response Java-object.
Cheers
/Oskar
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132389#4132389
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132389
16 years, 8 months
[Management, JMX/JBoss] - Re: MyMBean depending on MyOtherMBean issues
by FrankTheTank
Thanks for the reply.
Yes, I have the depends in the MyMBean's *-service.xml.
here are the contents:
MyOtherMBean jboss-service.xml
| <?xml version="1.0" encoding="UTF-8"?>
|
| <server>
| <mbean
| code="com.example.myothermbean.MyOtherMBean"
| name="com.example.myothermbean:service=MyOtherMBean">
|
| <mbean>
| <description>MyOtherMBean</description>
| <class>com.example.myothermbean.MyOtherMBean</class>
|
| <operation>
| <description>JBoss lifecycle operation</description>
| <name>start</name>
| <return-type>void</return-type>
| </operation>
| <operation>
| <description>JBoss lifecycle operation</description>
| <name>stop</name>
| <return-type>void</return-type>
| </operation>
| <operation>
| <description>JBoss lifecycle operation</description>
| <name>create</name>
| <return-type>void</return-type>
| </operation>
| <operation>
| <description>JBoss lifecycle operation</description>
| <name>destroy</name>
| <return-type>void</return-type>
| </operation>
|
| <attribute access='read-write' getMethod='getStarted' setMethod='setStarted'>
| <description>Server stated.</description>
| <name>Started</name>
| <type>boolean</type>
| </attribute>
|
| </mbean>
| </mbean>
| </server>
|
MyMBean
| <?xml version="1.0" encoding="UTF-8"?>
|
| <server>
| <mbean
| code="com.example.mymbean.MyMBean"
| name="com.example.mymbean:service=MyMBean">
|
| <depends>com.example.myothermbean:service=MyOtherMBean</depends>
|
| <mbean>
| <description>MyMBean</description>
| <class>com.example.mymbean.MyMBean</class>
| <operation>
| <description>JBoss lifecycle operation</description>
| <name>start</name>
| <return-type>void</return-type>
| </operation>
| <operation>
| <description>JBoss lifecycle operation</description>
| <name>stop</name>
| <return-type>void</return-type>
| </operation>
| <operation>
| <description>JBoss lifecycle operation</description>
| <name>create</name>
| <return-type>void</return-type>
| </operation>
| <operation>
| <description>JBoss lifecycle operation</description>
| <name>destroy</name>
| <return-type>void</return-type>
| </operation>
| </mbean>
| </mbean>
| </server>
|
Again, thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132387#4132387
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132387
16 years, 8 months
[JBossCache] - Re: NullPointerException when call the get(..) method, W
by liuhang781102
This is not the first things happened immediatelly after the cache start.
I modified my code ,now I get the fllowing exception stack. It is more clearly.
NullpointerException throws in the wasRemovedInTx method of CacheLoaderInterceptor class.
It seams that the 'entry' is null.
I also paste the function code.
Still need your help!
Exception Stack:
-----------------------------------------------------------
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at com.primeton.eos.fbframe.fbrole.security.filter.WebSecurityFilter.doFilter(WebSecurityFilter.java:101)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.lang.NullPointerException
at org.jboss.cache.interceptors.CacheLoaderInterceptor.wasRemovedInTx(CacheLoaderInterceptor.java:307)
at org.jboss.cache.interceptors.CacheLoaderInterceptor.invoke(CacheLoaderInterceptor.java:164)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.UnlockInterceptor.invoke(UnlockInterceptor.java:32)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.InvalidationInterceptor.invoke(InvalidationInterceptor.java:60)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterceptor.java:345)
at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:156)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:138)
at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5517)
... 44 more
The Excepton Code in jbosscache
-------------------------------------------------------------
private boolean wasRemovedInTx(Fqn fqn)
{
GlobalTransaction t = getInvocationContext().getGlobalTransaction();
if (t == null)
return false;
TransactionEntry entry = txTable.get(t);
Iterator i = entry.getCacheLoaderModifications().iterator(); ( ------------------ row 307----)
while (i.hasNext())
{
JBCMethodCall m = (JBCMethodCall)i.next();
if (m.getMethodId() == MethodDeclarations.removeNodeMethodLocal_id
&& fqn.isChildOrEquals((Fqn)m.getArgs()[1]))
return true;
}
return false;
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132379#4132379
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132379
16 years, 8 months