geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <>
Subject Re: Is there any reason to use @Remote for session bean...
Date Mon, 20 Aug 2007 19:09:25 GMT

On Aug 20, 2007, at 2:52 AM, Tomasz Mazan wrote:

>>> I've configured connection to context with theese settings
>>>        Properties properties = new Properties();
>>>        properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,  
>>> "org.apache.openejb.client.RemoteInitialContextFactory");
>>>        properties.setProperty(Context.PROVIDER_URL, "ejbd:// 
>>> localhost:4201");
>>>        this.ctx = new InitialContext(properties);


>>> and try to get remote SB with method
>>>    this.ctx.lookup("EJBtest-1.0.jar/CustomerFacade");
>>> and get instance of.... org.apache.openejb.client.JNDIContext..  
>>> where is my session bean?!
>> I think you need to append the name of the interface you are  
>> trying to get.  You could list the context to find out exactly  
>> what is bound there.
> CustomerFacade is the name of my interface that i try to get and  
> when i try to list the context using JNDIContext.list method -  
> method throws exception javax.namin.OperationNotSupportedException:  
> TODO: Needs to be implemented

Opened a JIRA for this (OPENEJB-668).  It does work however on  
anything running in the server-side if they construct an initial  
context using org.apache.openejb.client.LocalInitialContextFactory as  
the JNDI inital context factory provider.  You could do this in a  
servlet or ejb maybe.  But before we go there, it sounds like  
CustomerFacade is the name of your bean implementation.  That's the  
only way I can think that you would find a context there.

Can you paste the bean class name and the remote interface name?

>>> There is CustomerFacade in JNDIViewer tree - Geronimo Console,  
>>> but....
>>> 2) Although I set key log4j.logger.OpenEJB.startup to value INFO,  
>>> there's no jndi messages on console

Hmm. Did you get any additional output at all?  Figuring out how to  
get those log messages is definitely our best bet.  Maybe try just  
"log4j.logger.OpenEJB=INFO".  Also check that a similar line isn't  
already there for any "OpenEJB" log cagetories.


View raw message