EJB with Geronimo [message #1139342] |
Tue, 15 October 2013 14:06  |
Eclipse User |
|
|
|
Hi
I have tried to setup a RAP project, running directly out of my Workspace.
I am trying to access a Geronimo Server. I have done this before using RCP app and a open ejb client lib that required Buddy Loading to be set to work. However I can't get this to work in RAP.
The problem is that the Proxy Interface is not visible in the application's classloader:
java.lang.IllegalArgumentException: interface org.apache.openejb.client.EJBObjectProxy is not visible from class loader
Code:
Properties prop = new Properties();
prop.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.RemoteInitialContextFactory");
prop.put("java.naming.provider.url", "ejbd://localhost:4201");
prop.setProperty(Context.SECURITY_PRINCIPAL, "system");
prop.setProperty(Context.SECURITY_CREDENTIALS, "manager");
prop.setProperty("openejb.authentication.realmName", "geronimo-admin");
try {
InitialContext ServerContext = new InitialContext(prop);
ITestMe testme = (ITestMe) ServerContext.lookup("TestMeRemote");
.....
Any ideas how I get around this in in my RAP application?
Roland
|
|
|
Re: EJB with Geronimo [message #1140457 is a reply to message #1139342] |
Wed, 16 October 2013 07:17  |
Eclipse User |
|
|
|
Hi,
Solved it. Here is what I have done ... for everyone who is looking for a similar solution.
I had used a seperate Plugin Project that was holding the remote interfaces (and was shared with the ejb project). I just added the following to the manifest:
Import-Package: javax.ejb,
javax.ejb.embeddable,
javax.ejb.spi,
org.apache.openejb.client,
org.apache.openejb.client.java,
org.apache.openejb.client.proxy,
org.openejb.client
which has solved the issue.
Roland
|
|
|
Powered by
FUDForum. Page generated in 0.03795 seconds