Using RemoteServices & EJB Container? [message #533930] |
Mon, 17 May 2010 10:02  |
Eclipse User |
|
|
|
Hi!
At first congrats to a good framework idea.
I am especially interested in the RemoteService architecture. Maybe you can give me some best practices facing RemoteServices in conjunction with access to EJB's. My idea is to combine the Riena RemoteServices as client-server interface in oder to access a classic JEE5 or JEE6 server environment (with JBoss if possible). Are there any best practices how to realize such a solution? Or maybe you can give me some hints how you implement your RemoteServices to handle your business processes?
Thanks in advance!
Kind regards
Hannes Mintz
[Updated on: Mon, 17 May 2010 12:26] by Moderator
|
|
|
|
|
Re: Using RemoteServices & EJB Container [message #534800 is a reply to message #534514] |
Thu, 20 May 2010 06:50  |
Eclipse User |
|
|
|
Am 19.05.10 14:07, schrieb Hannes Mintz:
> Hi Christian!
>
> Just to be sure:
>
> So I would have to take the Riena server parts and pack them in a
> WAR-File and deploy it to JBoss with specific configurations. From there
> (RemoteServices) I call my SessionBeans. Therefore the RemoteServices
> are in a way my Session Facade. Am I right?
Right, the remote service (OSGi service on the server) calls the EJB Session Bean. Its a facade to the session bean and
of course it could also call multiple methods or multiple Session Beans during one remote service call. But thats
something you decided. Either the methods in the Remote Service are just 1:1 facades of the EJB Session methods or they
are tailored to the requirments in your Riena client which means the Remote Service possibly collects the data from
multiple calls to different EJB session beans.
>
> Are the Riena server parts just based on OSGI or do they use eclipse
> specific extension points? I ask this question because I found the JBoss
> OSGI project (http://community.jboss.org/wiki/jbossosgi) which sounds
> interesting in deploying OSGI Services to JBoss. Maybe that's also a
> possibility to deploy the Riena RemoteServices.
The Riena Server Parts are OSGi based components. So they need Equinox or something (we only tested Equinox so far). As
you may know all major Application Services (JBoss, BEA, Webshere etc.) are using an OSGi Kernel for themselves. So in
the past for an Riena Server in an Appserver environment you had the OSGi system that the Appserver uses and the one
that you uses. And while that is possible it is not always painless because i.e. there is only one set of System
properties for both OSGi kernels. So know I believe (and I didnt check that page) that the Appservers are starting to
make their OSGi Kernel usable by OSGi based components without adding a second OSGi Kernel.
For the Riena server parts to work you need the BridgeServlet in the .war file which basically picks up all servlet
requests (for this .war) and dispatches them to the ProxyServlet. On the way it switches the Classloader in the
ThreadContext from the one that the Appserver uses to the one that Equinox (in your war) uses. The ProxyServlet
dispatches it to a Http Adapter which then checks for an extension where you can specify different Servlets for
different aliases (pretty much what you do in web.xml in a normal .war). Riena has such an extension for /hessian where
it finds RienaHessionDispatcherServlet which then does the unmarshelling, calls the OSGi service, marshall reply. And
then all the way back through the chain where the Thread context classloader is set back to the one from the appserver....
And to answer the other question. I think it would be a good way to do the alternative and use jbossosgi. Its just that
we havnt tried that yet. If find anything out that works (or doesnt) let us know.
hope that helps
christian
>
> Kind regards
> Hannes
|
|
|
Re: Using RemoteServices & EJB Container [message #585563 is a reply to message #534492] |
Wed, 19 May 2010 08:07  |
Eclipse User |
|
|
|
Hi Christian!
Just to be sure:
So I would have to take the Riena server parts and pack them in a WAR-File and deploy it to JBoss with specific configurations. From there (RemoteServices) I call my SessionBeans. Therefore the RemoteServices are in a way my Session Facade. Am I right?
Are the Riena server parts just based on OSGI or do they use eclipse specific extension points? I ask this question because I found the JBoss OSGI project (http://community.jboss.org/wiki/jbossosgi) which sounds interesting in deploying OSGI Services to JBoss. Maybe that's also a possibility to deploy the Riena RemoteServices.
Kind regards
Hannes
|
|
|
Re: Using RemoteServices & EJB Container [message #585600 is a reply to message #585563] |
Thu, 20 May 2010 06:50  |
Eclipse User |
|
|
|
Am 19.05.10 14:07, schrieb Hannes Mintz:
> Hi Christian!
>
> Just to be sure:
>
> So I would have to take the Riena server parts and pack them in a
> WAR-File and deploy it to JBoss with specific configurations. From there
> (RemoteServices) I call my SessionBeans. Therefore the RemoteServices
> are in a way my Session Facade. Am I right?
Right, the remote service (OSGi service on the server) calls the EJB Session Bean. Its a facade to the session bean and
of course it could also call multiple methods or multiple Session Beans during one remote service call. But thats
something you decided. Either the methods in the Remote Service are just 1:1 facades of the EJB Session methods or they
are tailored to the requirments in your Riena client which means the Remote Service possibly collects the data from
multiple calls to different EJB session beans.
>
> Are the Riena server parts just based on OSGI or do they use eclipse
> specific extension points? I ask this question because I found the JBoss
> OSGI project (http://community.jboss.org/wiki/jbossosgi) which sounds
> interesting in deploying OSGI Services to JBoss. Maybe that's also a
> possibility to deploy the Riena RemoteServices.
The Riena Server Parts are OSGi based components. So they need Equinox or something (we only tested Equinox so far). As
you may know all major Application Services (JBoss, BEA, Webshere etc.) are using an OSGi Kernel for themselves. So in
the past for an Riena Server in an Appserver environment you had the OSGi system that the Appserver uses and the one
that you uses. And while that is possible it is not always painless because i.e. there is only one set of System
properties for both OSGi kernels. So know I believe (and I didnt check that page) that the Appservers are starting to
make their OSGi Kernel usable by OSGi based components without adding a second OSGi Kernel.
For the Riena server parts to work you need the BridgeServlet in the .war file which basically picks up all servlet
requests (for this .war) and dispatches them to the ProxyServlet. On the way it switches the Classloader in the
ThreadContext from the one that the Appserver uses to the one that Equinox (in your war) uses. The ProxyServlet
dispatches it to a Http Adapter which then checks for an extension where you can specify different Servlets for
different aliases (pretty much what you do in web.xml in a normal .war). Riena has such an extension for /hessian where
it finds RienaHessionDispatcherServlet which then does the unmarshelling, calls the OSGi service, marshall reply. And
then all the way back through the chain where the Thread context classloader is set back to the one from the appserver....
And to answer the other question. I think it would be a good way to do the alternative and use jbossosgi. Its just that
we havnt tried that yet. If find anything out that works (or doesnt) let us know.
hope that helps
christian
>
> Kind regards
> Hannes
|
|
|
Powered by
FUDForum. Page generated in 0.05355 seconds