Jean-Sebastien Delfino wrote:
David Blevins wrote:
This looks really cool.

If you guys want any special features, definitely let us know. We've got a 3.0.1 coming down the pipe soon-ish.

OK great, Thanks! I'm just starting to look into this, right now I'm able to register session beans implemented as POJOs, find them in JNDI using org.apache.openejb.core.ivm.naming.InitContextFactory and invoke them.

I've not been able to get the same working with a remote JNDI factory (org.apache.openejb.client.RemoteInitialContextFactory) yet. I'm just guessing at this point but I'm probably missing something in the initialization of the EJB server [1] for that to work.

I've fixed that part in SVN r660759.


Also at the moment I'm just registering a POJO that implements the Session bean business interface. Is there a way to register some kind of generic handler (like an Interceptor maybe?) to receive the invocation and any context that goes with it? I think I'll need that to dispatch incoming calls in a generic way to the Tuscany runtime to support non-POJO SCA components (BPEL, scripts etc).

Looking at your StatelessInterceptorTest test case, registering OpenEJB interceptors looks easy but I'm not sure if it's the best way to implement that. Any thoughts?


Don't know much of anything about the Tuscany architecture, but noticing you've got a module called host-http. We have some code in openejb-http that can support EJB invocations over HTTP which you may like. Might be nice if you don't want to have special ports open just for ejb, could do it all over the existing http setup.

The basic idea is to help people integrate SCA components (POJOs, scripts, BPEL processes etc) and EJB session beans using SCA EJB bindings.

SCA client components can already use EJB bindings to reference EJBs, like this:
<component name="MyClient">
  <implementation.java class="...MyClass"/>
  <reference name="myEJBService">
    <binding.ejb uri="jndiname or corbaname"/>
  </reference>
</component>

We've already implemented that client side support using the JDK ORB to invoke the EJB using the Corba DII, and it already works with OpenEJB.

Now I'm trying to complete the picture and allow an SCA component to configure its services using EJB bindings, like this:
<component name="MyServiceComponent">
  <implementation.java class="...MyClass"/>
  <service name="MyService">
    <binding.ejb uri="jndiname or corbaname"/>
  </service>
</component>

allowing EJBs (running on the same OpenEJB server or even a different server) to reference and invoke the SCA component as if it was just another EJB.

You just need a servlet like this one:
https://svn.apache.org/repos/asf/openejb/tags/openejb-3.0/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/common/ServerServlet.java

Been thinking to move that into the openejb-http module for a while, seems like a good reason to finally do it.

That looks cool, I'll take a look, as you said it could be useful to avoid opening additional ports. I have two questions:

- What would we need to do to support that HTTP based EJB invocation from our client/reference side EJB binding (which currently only supports CORBA)

- What does that interoperate with? just OpenEJB or do other EJB containers support that to?

-David

[1] http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/host-openejb/src/main/java/org/apache/tuscany/sca/host/openejb/OpenEJBServer.java



--
Jean-Sebastien

Reply via email to