geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomasz Mazan <>
Subject Re: Is there any reason to use @Remote for session bean...
Date Mon, 27 Aug 2007 09:30:29 GMT
David Blevins pisze:
> On Aug 20, 2007, at 1:40 PM, Tomasz Mazan wrote:
>> David Blevins pisze:
>>>>>> 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?
>> Class name : CustomerFacadeImpl (annotated with @Stateless)
>> Interface name : CustomerFacade (annotated with @Remote)
> Assuming the moduleId is 'EJBtest-1.0.jar' :
> ejbName      = CustomerFacadeImpl   (the default per spec rules)
> deploymentId = EJBtest-1.0.jar/CustomerFacadeImpl
> jndiName     = 
> EJBtest-1.0.jar/CustomerFacadeImpl/com.your.package.CustomerFacade
> Unless however you used the @Stateless annotation like this as I 
> suspect you might have:
> @Stateless(name="CustomerFacade")
> public class CustomerFacadeImpl .... {..}
> In which case your ejbName is CustomerFacade not CustomerFacadeImpl 
> and you then get this:
> ejbName      = CustomerFacade  (set in @Stateless)
> deploymentId = EJBtest-1.0.jar/CustomerFacade
> jndiName     = 
> EJBtest-1.0.jar/CustomerFacade/com.your.package.CustomerFacade
> I suspect this might be more accurate as you mentioned you found a 
> context when you looked up "EJBtest-1.0.jar/CustomerFacade" and that 
> would explain it.
David, Thanks for your help. I've just finished "holidays" in this 
subject and start trying to finish resolving this problem.
I'll must to investigate context using servlet to find all beans, 
because Your advice 
hasn't helped me - I get NameNotFoundException :-(
>>>>>> 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.
>> There's no more messages than this about deploy of MEJBGBean 
>> (warning). There's no jndi messages still there.
> As a last resort, you can change this line in
> -log4j.rootLogger=ERROR, CONSOLE, FILE
> +log4j.rootLogger=INFO, CONSOLE, FILE
> That should *definitely* do it, but the flood gates will be open :)
Only one, additional item of "flood" is MEJBGBean exception:

Module  6/36 
11:14:45,906 WARN  [startup] Unable to scrape for @Stateful, @
Stateless or @MessageDriven annotations. EjbModule URL not valid: MEJBGBean no protocol: MEJBGBean

... and no messages about jndi. Strange

View raw message