I' ve got enormous trouble with AOP Remoting!
Here a little Example!
I hope someone can tell me what I make wrong!

First the Simple Class HelloWorld:

  | package code;
  | 
  | public class HelloWorld {
  | 
  |     private String message;
  |     
  |     public HelloWorld(){
  |     }
  |     public void setMessage(String message){
  |             this.message=message;
  |     }       
  |     public String getMessage(){
  |             return message;
  |     }
  | }
  | 
This is the Mbean to is register my object with the Dispatcher!

  | import org.jboss.aop.Dispatcher;
  | import org.jboss.aop.remoting.Remoting;
  | import javax.naming.InitialContext;
  | 
  | public class Test implements TestMBean{
  | 
  |     public Test(){
  |             System.out.println("Hello MBean");
  |     }
  |     
  |     public void register(){ 
  |             code.HelloWorld hello = new code.HelloWorld(); 
  |             hello.setMessage("HelloWorld"); 
  |             Dispatcher.singleton.registerTarget("hello",hello);     
  |     }                                                
  |     public void start(){}
  |     public void stop(){}
  | }
  | 
and now the Client:
  | import org.jboss.aop.remoting.Remoting;
  | public class Client{
  | 
  |     public static void main(String[] args) {
  |             try{    
  |                     code.HelloWorld proxy 
=(code.HelloWorld)Remoting.createRemoteProxy("hello",code.HelloWorld.class,"socket://localhost:8084");
  |                     System.out.println(proxy.getClass()+"");
  |                     System.out.println(proxy.getMessage());
  |             }
  |             catch(Exception e1 ) {
  |                     System.out.println("Error happened !");
  |                     e1.printStackTrace ();
  |             }
  |     }
  | }
  | 
and here the output:
class org.jboss.aop.proxy$code.HelloWorld
  | org.jboss.remoting.SubsystemNotSupported: Subsystem 'AOP' not supported on target 
VM (InvokerLocator [socket://172.17.199.225:8084/])
  |     at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:355)
  |     at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:282)
  |     at 
org.jboss.remoting.transport.socket.SocketServerInvoker$Client.run(SocketServerInvoker.java:208)
  | Error happened !
  | 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3833727#3833727

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3833727


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to