This content has been marked as final.
Show 7 replies
-
1. Re: AOP Remoting
bill.burke May 5, 2004 7:46 AM (in response to kado0002)Much apologies. I haven't been able to give AOP Remoting much love since the original release both in code and in doco.
But anyways, you have to specify a connector:<mbean code="org.jboss.remoting.transport.Connector" xmbean-dd="org/jboss/remoting/transport/Connector.xml" name="jboss.remoting:type=Connector,transport=socket5150"> <attribute name="InvokerLocator">socket://localhost:5150</attribute> <attribute name="Configuration"> <handlers> <handler subsystem="AOP">org.jboss.aop.remoting.AOPRemotingInvocationHandler</handler> </handlers> </attribute> </mbean>
-
2. Re: AOP Remoting
kado0002 May 5, 2004 8:10 AM (in response to kado0002)Now I get an other Exception:
class org.jboss.aop.proxy$code.HelloWorld
java.lang.NullPointerException
at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:107)
at org.jboss.aop.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:75)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:369)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:282)
at org.jboss.remoting.transport.socket.SocketServerInvoker$Client.run(SocketServerInvoker.java:208)
Error happened !
It seems that the Hello World object isn't registered by the dispatcher
But as you can see, the register() method does this.
And I've executed the register method before executing the client! -
3. Re: AOP Remoting
bill.burke May 5, 2004 8:31 AM (in response to kado0002)Do you see a message:
Dispatcher trying to find methodMap for: .......
What exactly does it say? -
4. Re: AOP Remoting
bill.burke May 5, 2004 8:49 AM (in response to kado0002)Ok, I know what is wrong....(poor testing on my part)
I will fix this in the beta2 release, but you should do the following within the MBean:org.jboss.aop.proxy.ClassProxy.newInstance(code.HelloWorld.class);
The reason being is that the Dispatcher is looking for a hash to java.lang.reflect.Method map that is initialized by create proxy. I didn't have the foresite to test the scenario of the user not creating a proxy on the server side. The underlying remoting framework is being used in production, but the AOP layer on top of this is quite raw as you can see. I just haven't had the time to give it some love, nor has somebody stepped up to help.
Apologies.
Bill -
5. Re: AOP Remoting
kado0002 May 5, 2004 8:53 AM (in response to kado0002)Here the output:
R3/server/default/conf/jboss-service.xml
15:27:42,894 INFO [Server] JBoss (MX MicroKernel) [4.0.0DR3 (build: CVSTag=
date=200403161350)] Started in 23s:293ms
15:28:44,333 INFO [STDOUT] Dispatcher trying to find methodMap for: code.HelloWorld
15:28:44,333 INFO [STDOUT] java.lang.NullPointerException
15:28:44,333 INFO [STDOUT] at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:107)
15:28:44,333 INFO [STDOUT] at org.jboss.aop.remoting.AOPRemotingInvocation
Handler.invoke(AOPRemotingInvocationHandler.java:75)
15:28:44,333 INFO [STDOUT] at org.jboss.remoting.ServerInvoker.invoke(Server
Invoker.java:369)
15:28:44,333 INFO [STDOUT] at org.jboss.remoting.ServerInvoker.invoke(Server
Invoker.java:282)
15:28:44,333 INFO [STDOUT] at org.jboss.remoting.transport.socket.Socket
ServerInvoker$Client.run(SocketServerInvoker.java:208) -
6. Re: AOP Remoting
bill.burke May 5, 2004 11:30 AM (in response to kado0002)Did you apply the code suggestion to your MBean?
-
7. Re: AOP Remoting
kado0002 May 5, 2004 12:09 PM (in response to kado0002)Now it runs
thank you
Karsten