[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jboss-user
Subject:    [JBoss-user] [HTTPD, Servlets & JSP] - Embedded Tomcat remote EJB interface lookup
From:       bostjan_2 <nukes () jboss ! org>
Date:       2004-07-30 8:39:17
Message-ID: 27810504.1091176757350.JavaMail.root () ads ! jboss ! org
[Download RAW message or body]

Hi, 

I have following problem: 
Have EJB application where I have only remote interface (Session facade) and I am \
also using  jboss-app.xml : 
<?xml version='1.0' encoding='UTF-8'?>
  | <!DOCTYPE jboss-app PUBLIC "-//JBoss//DTD J2EE Application 1.3V2//EN" \
"http://www.jboss.org/j2ee/dtd/jboss-app_3_2.dtd">  | <jboss-app>
  |    <loader-repository>myejb:loader= myejb.ear</loader-repository>
  | </jboss-app>
while I have more then one instances of the same application, but different settings. \


My jboss.xml : 
<?xml version="1.0" encoding="UTF-8"?>
  | <jboss>
  |      <enterprise-beans>
  |      <session>
  |          <ejb-name>FacadeSessionEJB</ejb-name>
  |          <jndi-name>ejb/my_ejb/FacadeSessionEJB</jndi-name>
  |       </session>
  | ...
The problem is when I lookup for this interface from separately WAR file from Servlet \
like:  Hashtable env = new Hashtable();           
  | env.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory"); \
  | env.put(Context.PROVIDER_URL, "localhost:1099");
  | env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
  | final InitialContext context=new InitialContext(env);
  |       
  | FacadeSessionEJBHome ome facadeSessionEJBHome =
  |  (FacadeSessionEJBHome)PortableRemoteObject.narrow(context.lookup("ejb/my_ejb/FacadeSessionEJB"), \
FacadeSessionEJBHome.class);       |  FacadeSessionEJB myrefEJB= \
facadeSessionEJBHome.create(); I get on embedded Tomcat an error, but when I do the \
same thing in standalone (other process on the same machine) Tomcat it works just \
fine?  What I am doing wrong ??? 

Thanx Bostjan 

View the original post : \
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3843710#3843710

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3843710



-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic