You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Juergen Weber <we...@gmail.com> on 2009/09/07 12:37:12 UTC
Re: Corbaname of an EJB3 session bean
Hi, I was looking for a current CSIV2 sample and found this post.
But the samples in geronimo/server/trunk/testsuite/corba-testsuite seem to
be EJB rmi/iiop samples.
Is there a sample where a corba client connects to an EJB using CSIV2
security? The string CSIV2 is not found below testsuite.
Thanks, Juergen
djencks wrote:
>
> You have to set up a TSSGBean to configure the csiv2 security for
> your ejb and add a TSSLink gbean to associate the ejb with the
> security config.
>
> I think there's a fairly complete example in the testsuite.
>
> hope this helps
> david jencks
>
> On Mar 27, 2008, at 10:00 AM, Jean-Sebastien Delfino wrote:
>
>> Given the following EJB3 session bean, deployed to Geronimo v2.1:
>>
>> @Stateless(name="MyCatalogEJB")
>> public class MyCatalogEJBImpl implements CatalogEJB {
>> ...
>> }
>>
>> Having been able to lookup that EJB from a J2SE client as follows:
>>
>> Properties properties = new Properties();
>> properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,
>> "org.apache.openejb.client.RemoteInitialContextFactory");
>> properties.setProperty(Context.PROVIDER_URL,
>> "ejbd://localhost:4201");
>>
>> InitialContext context = new InitialContext(properties);
>>
>> CatalogEJB catalog = (CatalogEJB)
>> context.lookup("java:CatalogEJBRemote");
>>
>> I would like to look it up using CosNaming, something like that:
>>
>> InitialContext context = new InitialContext();
>> CatalogEJB catalog = (CatalogEJB)
>> context.lookup("corbaname:iiop:1.2@localhost:
>> 1050#CatalogEJBRemote");
>>
>> but whatever name I try I always get the same exception:
>>
>> Exception in thread "main" javax.naming.NameNotFoundException [Root
>> exception is org.omg.CosNaming.NamingContextPackage.NotFound:
>> IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
>> at com.sun.jndi.cosnaming.ExceptionMapper.mapException
>> (ExceptionMapper.java:44)
>> at com.sun.jndi.cosnaming.CNCtx.callResolve(CNCtx.java:484)
>> at com.sun.jndi.cosnaming.CNCtx.lookup(CNCtx.java:523)
>> at com.sun.jndi.toolkit.url.GenericURLContext.lookup
>> (GenericURLContext.java:185)
>> at javax.naming.InitialContext.lookup(InitialContext.java:392)
>> at client.Client.main(Client.java:24)
>> Caused by: org.omg.CosNaming.NamingContextPackage.NotFound:
>> IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
>> at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read
>> (NotFoundHelper.java:72)
>> at org.omg.CosNaming._NamingContextStub.resolve
>> (_NamingContextStub.java:251)
>> at com.sun.jndi.cosnaming.CNCtx.callResolve(CNCtx.java:470)
>> ... 4 more
>>
>>
>> Any idea of what I'm missing? Thanks.
>> --
>> Jean-Sebastien
>
>
>
--
View this message in context: http://www.nabble.com/Corbaname-of-an-EJB3-session-bean-tp16334653s134p25328434.html
Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.