tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomaz <tomaz.majerh...@arnes.si>
Subject tomcat6 lookup for remote EJB on glassfish
Date Wed, 09 May 2012 08:12:24 GMT
I'm struggling to get remote EJB from lookup, but with no success, is it posible to this in
Apache Tomcat/6.0.18?

When I'm using standalone client I get it but inside web application I can't get it work.

My web code:
--------------------

Properties props = new Properties();
props.setProperty("org.omg.CORBA.ORBInitialHost", "jalovec.arnes.si");
props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
final InitialContext ic = new InitialContext(props);

CalculatorApi calcEJBCli = (CalculatorApi) ic.lookup("java:global/Calculator-ejb/Calculator!si.arnes.ejb.remote.CalculatorRemoteApi");


My pom dependency for web appl:
---------------------
<dependency>
       	<groupId>org.glassfish.extras</groupId>
       	<artifactId>glassfish-embedded-web</artifactId>
       	<version>3.1-b32</version>
</dependency>


My EJB 3.1 on glassfish 3.1:
----------------------------
@Stateless(mappedName="CalculatorEJB", name="Calculator")


Glassfish info for my EJB:
--------------------------
Portable JNDI names for EJB Calculator : [java:global/Calculator-ejb/Calculator!si.arnes.ejb.local.CalculatorLocalApi,
java:global/Calculator-ejb/Calculator!si.arnes.ejb.remote.CalculatorRemoteApi]

Glassfish-specific (Non-portable) JNDI names for EJB Calculator : [CalculatorEJB#si.arnes.ejb.remote.CalculatorRemoteApi,
CalculatorEJB]


Error:
----------
Name global is not bound in this Context




What I'm doing wrong?


Regards, Tomaz







---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message