You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Charles Moulliard <cm...@gmail.com> on 2011/12/05 15:02:39 UTC

Missing piece with openejb on Apache karaf

Hi,

With last modifications committed and the new that I will patched, I have
been able to run OpenEJB on Apache Karaf and deploying from a jar an EJB
stateless service 

2011-12-05 14:54:29,947 | INFO  | FelixStartLevel  | startup                         
| ache.openejb.util.Slf4jLogStream   86 | 132 - org.apache.openejb.core -
4.0.0.beta-2-SNAPSHOT | Jndi(name=GreaterImplLocal) -->
Ejb(deployment-id=GreaterImpl)
2011-12-05 14:54:29,948 | INFO  | FelixStartLevel  | startup                         
| ache.openejb.util.Slf4jLogStream   86 | 132 - org.apache.openejb.core -
4.0.0.beta-2-SNAPSHOT |
Jndi(name=global/camel-ejb-1.0/GreaterImpl!org.apache.camel.example.remote.ejb.GreaterLocal)
--> Ejb(deployment-id=GreaterImpl)
2011-12-05 14:54:29,949 | INFO  | FelixStartLevel  | startup                         
| ache.openejb.util.Slf4jLogStream   86 | 132 - org.apache.openejb.core -
4.0.0.beta-2-SNAPSHOT | Jndi(name=GreaterImplRemote) -->
Ejb(deployment-id=GreaterImpl)
2011-12-05 14:54:29,950 | INFO  | FelixStartLevel  | startup                         
| ache.openejb.util.Slf4jLogStream   86 | 132 - org.apache.openejb.core -
4.0.0.beta-2-SNAPSHOT |
Jndi(name=global/camel-ejb-1.0/GreaterImpl!org.apache.camel.example.remote.ejb.GreaterRemote)
--> Ejb(deployment-id=GreaterImpl)
2011-12-05 14:54:29,950 | INFO  | FelixStartLevel  | startup                         
| ache.openejb.util.Slf4jLogStream   86 | 132 - org.apache.openejb.core -
4.0.0.beta-2-SNAPSHOT | Jndi(name=global/camel-ejb-1.0/GreaterImpl) -->
Ejb(deployment-id=GreaterImpl)

Question : With the following bundles / jars deployed, 

[ 129] [Active     ] [            ] [   60] Apache OpenEJB :: Container ::
API (4.0.0.beta-2-SNAPSHOT)
[ 130] [Active     ] [            ] [   60] Apache OpenEJB :: Container ::
Java Agent (4.0.0.beta-2-SNAPSHOT)
[ 131] [Active     ] [            ] [   60] Apache OpenEJB :: Container ::
Java EE (4.0.0.beta-2-SNAPSHOT)
[ 132] [Active     ] [            ] [   60] Apache OpenEJB :: Container ::
Core (4.0.0.beta-2-SNAPSHOT)
[ 134] [Active     ] [            ] [   60] Apache OpenEJB :: Container ::
OSGi (4.0.0.beta-2-SNAPSHOT)
[ 135] [Active     ] [            ] [   60] Apache OpenEJB :: Server ::
Client (4.0.0.beta-2-SNAPSHOT)
[ 136] [Active     ] [            ] [   60] Apache OpenEJB :: Container ::
Loader (4.0.0.beta-2-SNAPSHOT)


do we something else to be able to call the server as I get this error from
my unit test ?

WARNING: Failover: Cannot connect to server(s): ejbd://127.0.0.1:4201
Exception: Cannot connect to server 'ejbd://127.0.0.1:4201'.  Check that the
server is started and that the specified serverURL is correct..  Trying
next.

Regards,

Charles


--
View this message in context: http://openejb.979440.n4.nabble.com/Missing-piece-with-openejb-on-Apache-karaf-tp4160552p4160552.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Missing piece with openejb on Apache karaf

Posted by Romain Manni-Bucau <rm...@gmail.com>.
if you check you have not set openejb.nobanner system property you should
see lines like:

"** Starting Services **" in System.out (we doesn't use a logger for this
purpose).
and "Ready!"

if you don't see it, it is because no service are found which is possible
since we are looking for service files
(META-INF/org.apache.openejb.server.ServerService).

we are currently doing it
with: org.apache.openejb.server.SimpleServiceManager which uses current
thread loader.

we can write another service manager and use it setting the property
service manage
through: org.apache.openejb.server.ServiceManager#setServiceManager

FYI in TomEE we start manually cxf services by default so such a feature is
possible in OSGi too.

something like a custom activator starting/closing
org.apache.openejb.server.ejbd.EjbServer (init(), start() method + stop()
method).

- Romain


2011/12/5 Charles Moulliard <cm...@gmail.com>

> I have turned out the openejb-server and openejb-ejbd jars in bundles and
> deploy them but the error is still there. Surprisingly I don't see when the
> server starts a trace in the log like we have when running openejb in
> standalone mode. Of course, no error is reported in the log.
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Missing-piece-with-openejb-on-Apache-karaf-tp4160552p4160766.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>

Re: Missing piece with openejb on Apache karaf

Posted by Charles Moulliard <cm...@gmail.com>.
I have turned out the openejb-server and openejb-ejbd jars in bundles and
deploy them but the error is still there. Surprisingly I don't see when the
server starts a trace in the log like we have when running openejb in
standalone mode. Of course, no error is reported in the log. 

--
View this message in context: http://openejb.979440.n4.nabble.com/Missing-piece-with-openejb-on-Apache-karaf-tp4160552p4160766.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Missing piece with openejb on Apache karaf

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi Charles,

you need openejb-ejbd module (+ its dependencies, at least openejb-server i
guess).

i think it is not osgi ready today.

a workaround (to test your service) is to use the OSGi service registry
since i tried to register ejb in it (not sure if it was well done)

- Romain


2011/12/5 Charles Moulliard <cm...@gmail.com>

> Hi,
>
> With last modifications committed and the new that I will patched, I have
> been able to run OpenEJB on Apache Karaf and deploying from a jar an EJB
> stateless service
>
> 2011-12-05 14:54:29,947 | INFO  | FelixStartLevel  | startup
> | ache.openejb.util.Slf4jLogStream   86 | 132 - org.apache.openejb.core -
> 4.0.0.beta-2-SNAPSHOT | Jndi(name=GreaterImplLocal) -->
> Ejb(deployment-id=GreaterImpl)
> 2011-12-05 14:54:29,948 | INFO  | FelixStartLevel  | startup
> | ache.openejb.util.Slf4jLogStream   86 | 132 - org.apache.openejb.core -
> 4.0.0.beta-2-SNAPSHOT |
>
> Jndi(name=global/camel-ejb-1.0/GreaterImpl!org.apache.camel.example.remote.ejb.GreaterLocal)
> --> Ejb(deployment-id=GreaterImpl)
> 2011-12-05 14:54:29,949 | INFO  | FelixStartLevel  | startup
> | ache.openejb.util.Slf4jLogStream   86 | 132 - org.apache.openejb.core -
> 4.0.0.beta-2-SNAPSHOT | Jndi(name=GreaterImplRemote) -->
> Ejb(deployment-id=GreaterImpl)
> 2011-12-05 14:54:29,950 | INFO  | FelixStartLevel  | startup
> | ache.openejb.util.Slf4jLogStream   86 | 132 - org.apache.openejb.core -
> 4.0.0.beta-2-SNAPSHOT |
>
> Jndi(name=global/camel-ejb-1.0/GreaterImpl!org.apache.camel.example.remote.ejb.GreaterRemote)
> --> Ejb(deployment-id=GreaterImpl)
> 2011-12-05 14:54:29,950 | INFO  | FelixStartLevel  | startup
> | ache.openejb.util.Slf4jLogStream   86 | 132 - org.apache.openejb.core -
> 4.0.0.beta-2-SNAPSHOT | Jndi(name=global/camel-ejb-1.0/GreaterImpl) -->
> Ejb(deployment-id=GreaterImpl)
>
> Question : With the following bundles / jars deployed,
>
> [ 129] [Active     ] [            ] [   60] Apache OpenEJB :: Container ::
> API (4.0.0.beta-2-SNAPSHOT)
> [ 130] [Active     ] [            ] [   60] Apache OpenEJB :: Container ::
> Java Agent (4.0.0.beta-2-SNAPSHOT)
> [ 131] [Active     ] [            ] [   60] Apache OpenEJB :: Container ::
> Java EE (4.0.0.beta-2-SNAPSHOT)
> [ 132] [Active     ] [            ] [   60] Apache OpenEJB :: Container ::
> Core (4.0.0.beta-2-SNAPSHOT)
> [ 134] [Active     ] [            ] [   60] Apache OpenEJB :: Container ::
> OSGi (4.0.0.beta-2-SNAPSHOT)
> [ 135] [Active     ] [            ] [   60] Apache OpenEJB :: Server ::
> Client (4.0.0.beta-2-SNAPSHOT)
> [ 136] [Active     ] [            ] [   60] Apache OpenEJB :: Container ::
> Loader (4.0.0.beta-2-SNAPSHOT)
>
>
> do we something else to be able to call the server as I get this error from
> my unit test ?
>
> WARNING: Failover: Cannot connect to server(s): ejbd://127.0.0.1:4201
> Exception: Cannot connect to server 'ejbd://127.0.0.1:4201'.  Check that
> the
> server is started and that the specified serverURL is correct..  Trying
> next.
>
> Regards,
>
> Charles
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Missing-piece-with-openejb-on-Apache-karaf-tp4160552p4160552.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>