RE: Problems with JNDI lookups of ejb-ref-name defined inapplication-client.xml from a client application...

2001-03-16 Thread Alex Paransky

I think application-client.xml is broken in Orion.  The whole purpose of
having application-client.xml is to be able to map a client written by one
vendor, to the EJB written by another vendor.  Has any one been able to
"properly" use application-clientejb-ref to map ejb-ref-name to
ejb-link where both are NOT the same string?

Thanks.
-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Alex Paransky
Sent: Thursday, March 15, 2001 2:11 PM
To: Orion-Interest
Subject: Problems with JNDI lookups of ejb-ref-name defined in
application-client.xml from a client application...


I have a client application which has META-INF with the following
application-client.xml definition:

application-client
  ejb-ref
ejb-ref-nameejb/id/ejb-ref-name
ejb-ref-typeSession/ejb-ref-type
homecom.indnet.model.id.IdSessionHome/home
remotecom.indnet.model.id.IdSession/remote
ejb-linkId/ejb-link
  /ejb-ref
/application-client

In the client, I attempt to do the following:

new InitialContext().lookup("ejb/id");

The above fails with the naming exception, telling me that ejb/id cannot be
found:

Exception in thread "main" javax.naming.NameNotFoundException: ejb/id not
found
at com.evermind.server.rmi.RMIContext.lookup(JAX)
at com.evermind.naming.jz.lookup(JAX)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at com.indnet.model.id.test.Client.main(Client.java:16)

If I change my client line to read:

new InitialContext().lookup("Id");

Things work correctly.  "Id" is the ejb-name used for my object:

enterprise-beans
session
  ejb-nameId/ejb-name
  homecom.indnet.model.id.IdSessionHome/home
  remotecom.indnet.model.id.IdSession/remote
  ejb-classcom.indnet.model.id.IdSessionBean/ejb-class
  session-typeStateless/session-type
...

What is the purpose of application-client.xml if I cannot create references
and use the name specified in ejb-ref-name to lookup the components?  Or
am I missing something?

Thanks.
-AP_







SV: Problems with JNDI lookups of ejb-ref-name defined in application-client.xml from a client application...

2001-03-16 Thread Magnus Rydin
Title: SV: Problems with JNDI lookups of ejb-ref-name defined in application-client.xml  from a client application...





Did you try looking up java:comp/env/ejb/id ?
WR


 -Ursprungligt meddelande-
 Från: Alex Paransky [mailto:[EMAIL PROTECTED]]
 Skickat: den 15 mars 2001 14:11
 Till: Orion-Interest
 Ämne: Problems with JNDI lookups of ejb-ref-name defined in
 application-client.xml from a client application...
 
 
 I have a client application which has META-INF with the following
 application-client.xml definition:
 
 application-client
 ejb-ref
 ejb-ref-nameejb/id/ejb-ref-name
 ejb-ref-typeSession/ejb-ref-type
 homecom.indnet.model.id.IdSessionHome/home
 remotecom.indnet.model.id.IdSession/remote
 ejb-linkId/ejb-link
 /ejb-ref
 /application-client
 
 In the client, I attempt to do the following:
 
 new InitialContext().lookup(ejb/id);
 
 The above fails with the naming exception, telling me that 
 ejb/id cannot be
 found:
 
 Exception in thread main 
 javax.naming.NameNotFoundException: ejb/id not
 found
 at com.evermind.server.rmi.RMIContext.lookup(JAX)
 at com.evermind.naming.jz.lookup(JAX)
 at javax.naming.InitialContext.lookup(InitialContext.java:350)
 at com.indnet.model.id.test.Client.main(Client.java:16)
 
 If I change my client line to read:
 
 new InitialContext().lookup(Id);
 
 Things work correctly. Id is the ejb-name used for my object:
 
 enterprise-beans
 session
 ejb-nameId/ejb-name
 homecom.indnet.model.id.IdSessionHome/home
 remotecom.indnet.model.id.IdSession/remote
 ejb-classcom.indnet.model.id.IdSessionBean/ejb-class
 session-typeStateless/session-type
  ...
 
 What is the purpose of application-client.xml if I cannot 
 create references
 and use the name specified in ejb-ref-name to lookup the 
 components? Or
 am I missing something?
 
 Thanks.
 -AP_
 
 
 





Re: Problems with JNDI lookups of ejb-ref-name defined in application-client.xml from a client application...

2001-03-16 Thread colin harris

try:  new InitialContext().lookup("java:comp/env/ejb/id");


- Original Message -
From: "Alex Paransky" [EMAIL PROTECTED]
To: "Orion-Interest" [EMAIL PROTECTED]
Sent: Thursday, March 15, 2001 10:10 PM
Subject: Problems with JNDI lookups of ejb-ref-name defined in
application-client.xml from a client application...


 I have a client application which has META-INF with the following
 application-client.xml definition:

 application-client
   ejb-ref
 ejb-ref-nameejb/id/ejb-ref-name
 ejb-ref-typeSession/ejb-ref-type
 homecom.indnet.model.id.IdSessionHome/home
 remotecom.indnet.model.id.IdSession/remote
 ejb-linkId/ejb-link
   /ejb-ref
 /application-client

 In the client, I attempt to do the following:

 new InitialContext().lookup("ejb/id");

 The above fails with the naming exception, telling me that ejb/id cannot
be
 found:

 Exception in thread "main" javax.naming.NameNotFoundException: ejb/id not
 found
 at com.evermind.server.rmi.RMIContext.lookup(JAX)
 at com.evermind.naming.jz.lookup(JAX)
 at javax.naming.InitialContext.lookup(InitialContext.java:350)
 at com.indnet.model.id.test.Client.main(Client.java:16)

 If I change my client line to read:

 new InitialContext().lookup("Id");

 Things work correctly.  "Id" is the ejb-name used for my object:

 enterprise-beans
 session
   ejb-nameId/ejb-name
   homecom.indnet.model.id.IdSessionHome/home
   remotecom.indnet.model.id.IdSession/remote
   ejb-classcom.indnet.model.id.IdSessionBean/ejb-class
   session-typeStateless/session-type
 ...

 What is the purpose of application-client.xml if I cannot create
references
 and use the name specified in ejb-ref-name to lookup the components?  Or
 am I missing something?

 Thanks.
 -AP_









RE: Problems with JNDI lookups of ejb-ref-name defined in application-client.xml from a client application...

2001-03-16 Thread Bruno Baloi

Hia guys,


Here is a bit of my experience with this stuff - I found out that if I
have a regular Java client it's the ejb-jar.xml's ejb-name that is
being used to lookup the bean name without the comp/env. The comp/env is
only to be used by J2ee clients i.e. servlets or JSPs. For the J2EE
clients, it is the ejb-ref name that is used in the lookup.

It's weird as all hell !! But that how  I found out about this. IN other
words whatever you are using for the Home's lookup will depend on the
type of client you are using. To recap - for Java clients use
lookup("beanName") for J2EE clients ("java:comp/env/beanName")

Try giving this a try 

Good Luck



-Original Message-
From:   Magnus Rydin [SMTP:[EMAIL PROTECTED]]
Sent:   Friday, March 16, 2001 4:30 AM
To: Orion-Interest
Subject:    SV: Problems with JNDI lookups of ejb-ref-name
defined in application-client.xml  from a client application...

Did you try looking up "java:comp/env/ejb/id" ? 
WR 

 -Ursprungligt meddelande- 
 Frn: Alex Paransky [
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ] 
 Skickat: den 15 mars 2001 14:11 
 Till: Orion-Interest 
     mne: Problems with JNDI lookups of ejb-ref-name defined in 
 application-client.xml from a client application... 
 
 
 I have a client application which has META-INF with the
following 
 application-client.xml definition: 
 
 application-client 
   ejb-ref 
 ejb-ref-nameejb/id/ejb-ref-name 
 ejb-ref-typeSession/ejb-ref-type 
 homecom.indnet.model.id.IdSessionHome/home 
 remotecom.indnet.model.id.IdSession/remote 
 ejb-linkId/ejb-link 
   /ejb-ref 
 /application-client 
 
 In the client, I attempt to do the following: 
 
 new InitialContext().lookup("ejb/id"); 
 
 The above fails with the naming exception, telling me that 
 ejb/id cannot be 
 found: 
 
 Exception in thread "main" 
 javax.naming.NameNotFoundException: ejb/id not 
 found 
 at com.evermind.server.rmi.RMIContext.lookup(JAX) 
 at com.evermind.naming.jz.lookup(JAX) 
 at
javax.naming.InitialContext.lookup(InitialContext.java:350) 
 at
com.indnet.model.id.test.Client.main(Client.java:16) 
 
 If I change my client line to read: 
 
 new InitialContext().lookup("Id"); 
 
 Things work correctly.  "Id" is the ejb-name used for my
object: 
 
 enterprise-beans 
 session 
   ejb-nameId/ejb-name 
   homecom.indnet.model.id.IdSessionHome/home 
   remotecom.indnet.model.id.IdSession/remote 
   ejb-classcom.indnet.model.id.IdSessionBean/ejb-class

   session-typeStateless/session-type 
   ... 
 
 What is the purpose of application-client.xml if I cannot 
 create references 
 and use the name specified in ejb-ref-name to lookup the 
 components?  Or 
 am I missing something? 
 
 Thanks. 
 -AP_ 
 
 
 





Re: Problems with JNDI lookups of ejb-ref-name defined in application-client.xml from a client application...

2001-03-16 Thread Jeff Hubbach

Just a sidenote, maybe it's your problem. From page 377 of Enterprise
JavaBeans, 2nd Edition (Oreilly):

"The ejb-link value must match one of the ejb-name values declared in the same
deployment descriptor."

That is, it's only valid if you're using an ejb-jar.xml to define multiple
beans.

Jeff Hubbach.

Alex Paransky wrote:

 I have a client application which has META-INF with the following
 application-client.xml definition:

 application-client
   ejb-ref
 ejb-ref-nameejb/id/ejb-ref-name
 ejb-ref-typeSession/ejb-ref-type
 homecom.indnet.model.id.IdSessionHome/home
 remotecom.indnet.model.id.IdSession/remote
 ejb-linkId/ejb-link
   /ejb-ref
 /application-client

 In the client, I attempt to do the following:

 new InitialContext().lookup("ejb/id");

 The above fails with the naming exception, telling me that ejb/id cannot be
 found:

 Exception in thread "main" javax.naming.NameNotFoundException: ejb/id not
 found
 at com.evermind.server.rmi.RMIContext.lookup(JAX)
 at com.evermind.naming.jz.lookup(JAX)
 at javax.naming.InitialContext.lookup(InitialContext.java:350)
 at com.indnet.model.id.test.Client.main(Client.java:16)

 If I change my client line to read:

 new InitialContext().lookup("Id");

 Things work correctly.  "Id" is the ejb-name used for my object:

 enterprise-beans
 session
   ejb-nameId/ejb-name
   homecom.indnet.model.id.IdSessionHome/home
   remotecom.indnet.model.id.IdSession/remote
   ejb-classcom.indnet.model.id.IdSessionBean/ejb-class
   session-typeStateless/session-type
 ...

 What is the purpose of application-client.xml if I cannot create references
 and use the name specified in ejb-ref-name to lookup the components?  Or
 am I missing something?

 Thanks.
 -AP_

--
Jeff Hubbach
Internet Developer
New Media Designs, Inc.
www.nmd.com







RE: Problems with JNDI lookups of ejb-ref-name defined inapplication-client.xml from a client application...

2001-03-16 Thread Alex Paransky

You are exactly correct.  This IS how it is working in Orion but this does
not seem to the correct.

Suppose you have an EJB that implements some STANDARD interface already
defined, deployed and used by many applications and from many places.  You
buy a client application from a vendor who has implemented a new GUI to work
with this STANDARD interface.  The vendor defines application-client.xml and
you need to augment it with ejb-link to point to the actual bean.  The
vendor DOES NOT know what is the REAL PHYSICAL name of the bean which
implemented the STANDARD interface in your environment, so there is no way
for the vendor to do a lookup based on "beanName".  The client vendor writes
his application to lookup on the value in ejb-ref-name.

If this is the way Orion is working, this appears to be somewhat of a
serious bug.

By the way, when I try to use "java:comp/env" from my client, I get the
following exception:

Exception in thread "main" javax.naming.NamingException: java:comp/env
namespace is only available from within a J2EE component
at
com.sun.enterprise.naming.java.javaURLContext.getComponentContext(javaURLCon
text.java:392)
at
com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:51)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at client.PersonClient.main(PersonClient.java:25)

Should I record this as a bug, or does any one have other ideas?

Thanks to all that replied
-AP_


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Bruno Baloi
Sent: Friday, March 16, 2001 6:54 AM
To: Orion-Interest
Subject: RE: Problems with JNDI lookups of ejb-ref-name defined in
application-client.xml from a client application...


Hia guys,


Here is a bit of my experience with this stuff - I found out that if I
have a regular Java client it's the ejb-jar.xml's ejb-name that is
being used to lookup the bean name without the comp/env. The comp/env is
only to be used by J2ee clients i.e. servlets or JSPs. For the J2EE
clients, it is the ejb-ref name that is used in the lookup.

It's weird as all hell !! But that how  I found out about this. IN other
words whatever you are using for the Home's lookup will depend on the
type of client you are using. To recap - for Java clients use
lookup("beanName") for J2EE clients ("java:comp/env/beanName")

Try giving this a try 

Good Luck



-Original Message-
From:   Magnus Rydin [SMTP:[EMAIL PROTECTED]]
Sent:   Friday, March 16, 2001 4:30 AM
To: Orion-Interest
Subject:SV: Problems with JNDI lookups of ejb-ref-name
defined in application-client.xml  from a client application...

Did you try looking up "java:comp/env/ejb/id" ?
WR

 -Ursprungligt meddelande-
 Frn: Alex Paransky [
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ]
 Skickat: den 15 mars 2001 14:11
     Till: Orion-Interest
 mne: Problems with JNDI lookups of ejb-ref-name defined in
 application-client.xml from a client application...


 I have a client application which has META-INF with the
following
 application-client.xml definition:

 application-client
   ejb-ref
 ejb-ref-nameejb/id/ejb-ref-name
 ejb-ref-typeSession/ejb-ref-type
 homecom.indnet.model.id.IdSessionHome/home
 remotecom.indnet.model.id.IdSession/remote
 ejb-linkId/ejb-link
   /ejb-ref
 /application-client

 In the client, I attempt to do the following:

 new InitialContext().lookup("ejb/id");

 The above fails with the naming exception, telling me that
 ejb/id cannot be
 found:

 Exception in thread "main"
 javax.naming.NameNotFoundException: ejb/id not
 found
 at com.evermind.server.rmi.RMIContext.lookup(JAX)
 at com.evermind.naming.jz.lookup(JAX)
 at
javax.naming.InitialContext.lookup(InitialContext.java:350)
 at
com.indnet.model.id.test.Client.main(Client.java:16)

 If I change my client line to read:

 new InitialContext().lookup("Id");

 Things work correctly.  "Id" is the ejb-name used for my
object:

 enterprise-beans
 session
   ejb-nameId/ejb-name
   homecom.indnet.model.id.IdSessionHome/home
   remotecom.indnet.model.id.IdSession/remote
   ejb-classcom.indnet.model.id.IdSessionBean/ejb-class

   session-typeStateless/session-type
   ...

 What is the purpose of application-client.xml if I cannot
 create references
 and use the n

RE: Problems with JNDI lookups of ejb-ref-name defined in application-client.xml from a client application...

2001-03-16 Thread Alex Paransky



I 
tried that before, and got the following exception:

Exception in thread "main" javax.naming.NamingException: java:comp/env 
namespace is only available from within a J2EE 
component at 
com.sun.enterprise.naming.java.javaURLContext.getComponentContext(javaURLContext.java:392) 
at 
com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:51) 
at 
javax.naming.InitialContext.lookup(InitialContext.java:350) 
at client.PersonClient.main(PersonClient.java:25)
Is 
this a bug?

-AP_
 
 

  -Original Message-From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]On Behalf Of Magnus 
  RydinSent: Friday, March 16, 2001 1:30 AMTo: 
  Orion-InterestSubject: SV: Problems with JNDI lookups of 
  ejb-ref-name defined in appli cation-client.xml from a client 
  application...
  Did you try looking up "java:comp/env/ejb/id" ? 
  WR 
   -Ursprungligt meddelande-  Från: Alex Paransky [mailto:[EMAIL PROTECTED]] 
   Skickat: den 15 mars 2001 14:11  Till: Orion-Interest  Ämne: Problems 
  with JNDI lookups of ejb-ref-name defined in  application-client.xml from a client application... 
 I have a client application which has META-INF with the 
  following  application-client.xml 
  definition:   
  application-client  
  ejb-ref  
  ejb-ref-nameejb/id/ejb-ref-name  
  ejb-ref-typeSession/ejb-ref-type  
  homecom.indnet.model.id.IdSessionHome/home  
  remotecom.indnet.model.id.IdSession/remote  ejb-linkId/ejb-link 
   /ejb-ref  /application-client  
   In the client, I attempt to do the 
  following:   new 
  InitialContext().lookup("ejb/id");  
   The above fails with the naming exception, 
  telling me that  ejb/id cannot be  found:   
  Exception in thread "main"  
  javax.naming.NameNotFoundException: ejb/id not  
  found  at 
  com.evermind.server.rmi.RMIContext.lookup(JAX)  at 
  com.evermind.naming.jz.lookup(JAX)  at 
  javax.naming.InitialContext.lookup(InitialContext.java:350)  at 
  com.indnet.model.id.test.Client.main(Client.java:16)   If I change my client line to 
  read:   new 
  InitialContext().lookup("Id");   Things work correctly. "Id" is the ejb-name used for 
  my object:   
  enterprise-beans  
  session  
  ejb-nameId/ejb-name  
  homecom.indnet.model.id.IdSessionHome/home  
  remotecom.indnet.model.id.IdSession/remote  
  ejb-classcom.indnet.model.id.IdSessionBean/ejb-class 
   
  session-typeStateless/session-type   ...  
   What is the purpose of application-client.xml if 
  I cannot  create references  and use the name specified in ejb-ref-name to lookup the 
   components? Or  
  am I missing something?   Thanks.  -AP_
  


RE: Problems with JNDI lookups of ejb-ref-name defined inapplication-client.xml from a client application...

2001-03-16 Thread Alex Paransky

Well, if that's the case, then what's the point of putting ejb-ref in to the
application-client?  The client can just always lookup by absolute name
inthe JNDI namespace.  And how would an independent client developer
possibly know the EJB names deployed in your custom environment?

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Jeff Hubbach
Sent: Friday, March 16, 2001 8:00 AM
To: Orion-Interest
Subject: Re: Problems with JNDI lookups of ejb-ref-name defined in
application-client.xml from a client application...


Just a sidenote, maybe it's your problem. From page 377 of Enterprise
JavaBeans, 2nd Edition (Oreilly):

"The ejb-link value must match one of the ejb-name values declared in the
same
deployment descriptor."

That is, it's only valid if you're using an ejb-jar.xml to define multiple
beans.

Jeff Hubbach.

Alex Paransky wrote:

 I have a client application which has META-INF with the following
 application-client.xml definition:

 application-client
   ejb-ref
 ejb-ref-nameejb/id/ejb-ref-name
 ejb-ref-typeSession/ejb-ref-type
 homecom.indnet.model.id.IdSessionHome/home
 remotecom.indnet.model.id.IdSession/remote
 ejb-linkId/ejb-link
   /ejb-ref
 /application-client

 In the client, I attempt to do the following:

 new InitialContext().lookup("ejb/id");

 The above fails with the naming exception, telling me that ejb/id cannot
be
 found:

 Exception in thread "main" javax.naming.NameNotFoundException: ejb/id not
 found
 at com.evermind.server.rmi.RMIContext.lookup(JAX)
 at com.evermind.naming.jz.lookup(JAX)
 at javax.naming.InitialContext.lookup(InitialContext.java:350)
 at com.indnet.model.id.test.Client.main(Client.java:16)

 If I change my client line to read:

 new InitialContext().lookup("Id");

 Things work correctly.  "Id" is the ejb-name used for my object:

 enterprise-beans
 session
   ejb-nameId/ejb-name
   homecom.indnet.model.id.IdSessionHome/home
   remotecom.indnet.model.id.IdSession/remote
   ejb-classcom.indnet.model.id.IdSessionBean/ejb-class
   session-typeStateless/session-type
 ...

 What is the purpose of application-client.xml if I cannot create
references
 and use the name specified in ejb-ref-name to lookup the components?  Or
 am I missing something?

 Thanks.
 -AP_

--
Jeff Hubbach
Internet Developer
New Media Designs, Inc.
www.nmd.com








Problems with JNDI lookups of ejb-ref-name defined in application-client.xml from a client application...

2001-03-15 Thread Alex Paransky

I have a client application which has META-INF with the following
application-client.xml definition:

application-client
  ejb-ref
ejb-ref-nameejb/id/ejb-ref-name
ejb-ref-typeSession/ejb-ref-type
homecom.indnet.model.id.IdSessionHome/home
remotecom.indnet.model.id.IdSession/remote
ejb-linkId/ejb-link
  /ejb-ref
/application-client

In the client, I attempt to do the following:

new InitialContext().lookup("ejb/id");

The above fails with the naming exception, telling me that ejb/id cannot be
found:

Exception in thread "main" javax.naming.NameNotFoundException: ejb/id not
found
at com.evermind.server.rmi.RMIContext.lookup(JAX)
at com.evermind.naming.jz.lookup(JAX)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at com.indnet.model.id.test.Client.main(Client.java:16)

If I change my client line to read:

new InitialContext().lookup("Id");

Things work correctly.  "Id" is the ejb-name used for my object:

enterprise-beans
session
  ejb-nameId/ejb-name
  homecom.indnet.model.id.IdSessionHome/home
  remotecom.indnet.model.id.IdSession/remote
  ejb-classcom.indnet.model.id.IdSessionBean/ejb-class
  session-typeStateless/session-type
...

What is the purpose of application-client.xml if I cannot create references
and use the name specified in ejb-ref-name to lookup the components?  Or
am I missing something?

Thanks.
-AP_






JNDI lookups

2000-05-25 Thread Alexandre J. Boudreau

Hi everyone,

this might have been asked before, but I have a question regarding JNDI
lookups.

I tried the ConverterApp example that is in the J2EE Developer's Guide
(Getting Started). So I used the J2EE deploytol and then deployed the ear in
orion. In order to run the application Client I need to put both the
client-jar and the EJB-jar in the classpath:

CPATH=.;%ORION_HOME%\orion.jar;%ORION_HOME%\ejb.jar;%ORION_HOME%\jndi.jar;ap
p-client-ic.jar;ejb-jar-ic.jar

java -classpath %CPATH% ConverterClient


If I don't put the ejb-jar in the classpath, the client doesn't run. So in
this sense, it seems that the JNDI name lookup doesn't work!? Then how would
I go about running a remote client that communicates with the ejb if such
lookup doesn't work?

It's possible that I misunderstood something.
So any comments would be appreciated.

thanks

regards,

Alex

Alexandre J. Boudreau
President, Directeur de Projets
Fibro Movement Corp.


BEGIN:VCARD
VERSION:2.1
N:Boudreau;Alexandre;J.
FN:Alexandre J. Boudreau
ORG:Fibro Movement
TEL;WORK;VOICE:514-575-1580
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:2224T064224Z
END:VCARD