Hi,

I'm fairly new to Orion Server, as well, but it looks like this has to do
with looking up the name of the EJB, not with threads.  The error has to do
with the InitialContext and com.evermind.naming.  In particular, the
javax.naming.InitialContext.lookup(Unknown Source) leads me to believe that
your client can't find the naming service.  Without the naming service, the
client cannot look up the home interface for the EJB (or a remote CORBA
reference if the GGService is a CORBA service).

Looks like the client is trying to call a "getCart" method, which is
looking for a service (is this a CORBA service or an EJB?).  The error is
that the client is not in the application's scope -- it can't find the name
because the <whatever> naming service is not available in the
InitialContext for the client.

Clients do not interact directly with EJBs, rather, they are isolated by
the EJB container (in this case, the container is provided by the Orion
product).  A client must look up the name of the EJB (its "home").
Typically, this is done via JNDI (Java Naming and Directory Interface), but
can also be found via CORBA's COS Naming, and other naming mechanisms.

In the GGService.jar, you should have a configuration file called
ejb-jar.xml.  This is NOT where you assign the JNDI name to the EJB
components.  In fact, in the Orion documentation (you can download this --
see ejb-jar.xml.html), it states,
"There is no architected relationship between the ejb-name in the
deployment descriptor and the JNDI name that the Deployer will assign to
the enterprise bean's home."

The JNDI mapping is provided by the Deployer (not the component developer)
and/or is automatically assigned by Orion.  That is, you can let Orion
automatically assign the JNDI name, or you can edit the configuration file
yourself.   Per orion-ejb-jar.xml.html: "It is located in
ORION_HOME/application-deployments/deploymentName/jarname(.jar)/orion-ejb-ja
r.xml or orion/orion-ejb-jar.xml below the ejb-jar root if no
deployment-directory is specified in server.xml."  You should be able to
edit this directly after Orion deploys the EJB defined in your .ear file
(when Orion deploys it, Orion creates a directory for your application
under <ORION_HOME>/application-deployments).

I don't know what client you are trying to use.  If it's a web client, then
the orion-web.xml file needs to have the proper JNDI name(s) for your EJB
resources.  

If the client is a Java application run from the command line, you may need
to have a jndi.properties file for setting how names are looked up (see the
EJB product demo in <ORION_HOME>/demo/ejb/product for an example using
jndi.properties, noting the naming factory and provider settings).  Also,
such a client could be using the wrong name in it's source code to look up
the EJB's home.  Look for some client code that deals with the
InitialContext and finding the EJB home.

I hope this helps, but I could be totally off target, so I hope some other
Orion users join in.

Jay Armstrong
[EMAIL PROTECTED]
  
At 04:02 PM 12/12/00 -0000, you wrote:
>     I'm new to Orion Server and I'm having problems setting up my EJB
>beans.   I put all my .jar files in one .ear file. 
>My application.xml looks like this   <""> 
><"""http://java.sun.com/j2ee/dtds/application_1_2.dtd">  <> 
>  <><> 
>  <> 
>      <><> 
>  <>    
>  <> 
>       <><> 
>  <> 
>  <> 
>        <><> 
>  <> 
>  <> 
>      <><> 
>  <> 
>  <>   and the server.xml looks like this   <""""> 
> <""> 
> <""> 
> <""> 
> <""> 
> <""> 
> <"">   The beans in bgp.jar works fine when i access them, 
>but when i am accessing the beans that are in the GGService.jar file i'm  
>having problems... 
>Here is the stack trace...   javax.naming.NamingException: Not in an
>application scope - start Orion with the 
> -userThreads switch if using user-created threads 
>        at com.evermind.server.g3.bi(JAX) 
>        at com.evermind.naming.jx.lookup(JAX) 
>        at javax.naming.InitialContext.lookup(Unknown Source) 
>        at
>com.betware.bgp.client.BwBrokerModel.getGGService(BwBrokerModel.java: 
>1713) 
>        at
>com.betware.bgp.client.BwBrokerModel.getCart(BwBrokerModel.java:694)   I
>have tried to start Orion with -userThreads switch on but it doesnt
matter...  
>  What I am i doing wrong?   H�r�ur Birgisson 
>Programmer at Betware    


Reply via email to