|
From: <ant...@yo...> - 2014-02-03 13:02:12
|
Thanks Markus for your answer.
Unfortunately, I can not test with 2 glassfish v2.
In SigningAndValidationEJB constructor comment, we can see that :
/**
* Creates an instance of SigningAndValidationEJB with default
initial context:
* <pre>
* INITIAL_CONTEXT_FACTORY =
"org.jnp.interfaces.NamingContextFactory"
* URL_PKG_PREFIXES = "org.jboss.naming:org.jnp.interfaces"
* PROVIDER_URL = "jnp://localhost:1099"
* </pre>
*
* @throws NamingException If an naming exception is encountered.
*/
Is it the correct configuration to connect with an EJB ?
Thanks,
Antoine
Le 03.02.2014 09:23, Markus Kilås a écrit :
> On 2014-02-02 01:43, ant...@yo... wrote:
>> Hi everyone,
>>
>> I try to access to a Remote EJB from an instance of glassfish 3.
>>
>> Signserver is running on another server on glassfish 2.
>>
>> I can not access to the remote ejb. The jndi name is not recognized.
>>
>> Here is my code :
>>
>> Properties props = new Properties();
>> props.setProperty("org.omg.CORBA.ORBInitialHost", "signserverpki");
>> props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
>> InitialContext ic = null;
>> try {
>> ic = new InitialContext(props);
>> } catch (NamingException ex) {
>> java.util.logging.Logger.getLogger(SignatureWS.class.getName()).log(Level.SEVERE,
>> null, ex);
>> }
>>
>> IRemote worker = null;
>> try {
>> worker = (IRemote)
>> ic.lookup("org.signserver.ejb.interfaces.IWorkerSession$IRemote");
>> } catch (NamingException ex) {
>> java.util.logging.Logger.getLogger(SignatureWS.class.getName()).log(Level.SEVERE,
>> null, ex);
>> }
>>
>> The exception thrown is :
>> javax.naming.NamingException: Lookup failed for
>> 'org.signserver.ejb.interfaces.IWorkerSession$IRemote' in
>> SerialContext[myEnv={org.omg.CORBA.ORBInitialPort=3700,
>> java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory,
>> org.omg.CORBA.ORBInitialHost=signserverpki,
>> java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl,
>> java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root
>> exception
>> is javax.naming.NameNotFoundException:
>> org.signserver.ejb.interfaces.IWorkerSession$IRemote not found]
>>
>>
>> I am working with signserver 3.2.3
>>
>> Thanks a lot for your help.
>>
>>
>> Antoine
>>
>> ------------------------------------------------------------------------------
>> WatchGuard Dimension instantly turns raw network data into actionable
>> security intelligence. It gives you real-time visual feedback on key
>> security issues and trends. Skip the complicated setup - simply
>> import
>> a virtual appliance and go from zero to informed in seconds.
>> http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
>> _______________________________________________
>> SignServer-develop mailing list
>> Sig...@li...
>> https://lists.sourceforge.net/lists/listinfo/signserver-develop
>>
>
> Hi Antoine,
>
> I don't think I tried EJB lookups between different application servers
> and especially not between two different versions, but at least the
> code
> looks correct if it were used to lookup from a client application.
>
> Maybe there could be an issue with the two different versions, have you
> tried if the code works between two GlassFish V2 ?
>
>
> Regards,
> Markus
>
>
> ------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
> _______________________________________________
> SignServer-develop mailing list
> Sig...@li...
> https://lists.sourceforge.net/lists/listinfo/signserver-develop
|