lmappletserver needs to support Applet calls to traditional POJO's on a remote
server (such as Jakarta Tomcat) in additon to EJB3 objects.
How should we implement this? Ideas? Thoughts?
How should the interaction work between the applet and the POJO? How about security?
One thought is that an Appletservice POJO class
should not be called directly but rather through an interface or a proxy/delgation object. The best solution from the user point of view would be if one only had to annotate the POJO with an annotation which actually generated the interface or proxy/delegation object to serialize on the fly.
This could maybe be achieved with introspection/reflection or using a InvocationHandler ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Now HelloWorldBeanRemote is an interface, and the question is if we also need the POJO beans to implement an interface that can be exported to the client. It would be very smooth if we could for instance only annotate the POJO bean with @AppletServicePOJO, and an interface could be created on the fly. However since the AppletServer also feeds the client with classes the question is if this interface does have to be an actual class file, or if it can be created dynamically?
Regards,
Peter
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
lmappletserver needs to support Applet calls to traditional POJO's on a remote
server (such as Jakarta Tomcat) in additon to EJB3 objects.
How should we implement this? Ideas? Thoughts?
How should the interaction work between the applet and the POJO? How about security?
One thought is that an Appletservice POJO class
should not be called directly but rather through an interface or a proxy/delgation object. The best solution from the user point of view would be if one only had to annotate the POJO with an annotation which actually generated the interface or proxy/delegation object to serialize on the fly.
This could maybe be achieved with introspection/reflection or using a InvocationHandler ?
Hi,
The most important is to keep the dynamic proxy approach. So that you can get an interface on the client, where it can be applied to a dynamic proxy.
You want to call business objects like this:
HelloWorldBeanRemote remoteObj = (HelloWorldBeanRemote)AppletServiceClientProxy.newInstance(HelloWorldBeanRemote.class);
System.out.println(remoteObj.sayHelloWorld());
Now HelloWorldBeanRemote is an interface, and the question is if we also need the POJO beans to implement an interface that can be exported to the client. It would be very smooth if we could for instance only annotate the POJO bean with @AppletServicePOJO, and an interface could be created on the fly. However since the AppletServer also feeds the client with classes the question is if this interface does have to be an actual class file, or if it can be created dynamically?
Regards,
Peter