Hi,

 

I am trying to configure OpenEJB as part of an Eclipse rich-client
platform (RCP) application that I am developing.

 

I have managed to package OpenEJB 3.1 as an Eclipse plug-in by
"rebundling" the OpenEJB lib folder as an Eclipse RCP plug-in project.
This is to get round the problem with the javaee-api jar file not being
a valid OSGi bundle, but also to avoid generating a separate plug-in for
every jar file in the OpenEJB server.

 

So far, I have managed to get unit tests to work successfully with my
OpenEJB plug-in as a "buddy" of my plug-in that defines the EJBs. I am
running the tests in a fragment of the EJB plug-in. However, this relied
on the test plug-in to configure and start the OpenEJB server, something
I'm not particularly happy with.

 

Anyway, I'm currently trying to get OpenEJB to start the server when its
plug-in is activated, and then deploy and undeploy applications when
other plug-ins are started and stopped. This would use the OSGi service
framework and the so-called "white-board" model (see [1]).

 

However, for this to work, I must be able to dynamically deploy an
application on the local server after the server has started (and, for
example, after the test plug-in fragment has properly configured the
test database for my EJBs). This is where I am having problems. I've
spent some time looking through the OpenEJB source to try and work out
how an application is deployed, and I think I want to use the
Deployer.deploy() method from the DeployerEjb class. Alas, I cannot work
out how to get access to this object from within my own code. As far as
I can see, the only examples of using this method directly in the
OpenEJB code rely on doing a JNDI lookup of
"openejb/DeployerBusinessRemote", and this name does not appear to be
bound in a local server.

 

Can anyone point me towards examples of deploying and undeploying
applications on a local OpenEJB server from within Java code?

 

Many thanks,

Deryck Brown

 

References

 

[1] http://www.knopflerfish.org/osgi_service_tutorial.html#white

 

-- 

Dr Deryck F Brown

Software Engineer

Ziebel UK Ltd

Unit A, Broadfold Road,

Bridge of Don,

Aberdeen AB23 8EE

 

Reply via email to