Hi Rupesh,

I wasn't sure about it. Thats why I said "commom used to lookup Local
Interfaces " & "you don't need to use it" instead of "always used" & "you
shouldn't use it".

Thanks!


Fabricio.


----- Original Message -----
From: "Rupesh" <[EMAIL PROTECTED]>
To: "Fabricio Nogueira" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, April 17, 2002 1:47 PM
Subject: Re: Re: ENC lookup problems


> There is no restriction like "java:comp/env" be used only with local home.
> This can be used for any kind of lookup as long as the reference is
refined
> for that on the server. Generally the references can be defined and looked
> up for home, localhome, resources (like datasource, mail resource, JMS
> resources) etc.
>
> Regards,
> Rupesh.
>
>
> > Hi Rahul,
> >
> > The "java:comp/env" prefix is commom used to lookup Local Interfaces.
> Since
> > you're using Remote Interfaces, you don't need to use it. Thus, in your
> > case, the JNDI name will be "ejb/MyAdminHome", but there's another
problem
> > around this: you're declaring the JNDI name as "MyAdminHome" only,
that's
> > why it's the only way it works.
> >
> > If you change
> >   <jndi-name>MyAdminHome</jndi-name>
> > to
> >   <jndi-name>ejb/MyAdminHome</jndi-name>
> > , you'll be able to lookup "ejb/MyAdminHome".
> >
> >
> > But if you really want to lookup Local Interfaces (using the
> "java:comp/env"
> > prefix), you should change your interfaces (Remote->Local, Home->
> LocalHome)
> > and your descriptor file:
> > >         <local-home>com.abc.xyz.ejb.MyAdminLocalHome</local-home>
> > >         <local>com.abc.xyz.ejb.MyAdminLocal</local>
> >
> >
> >
> > HTH,
> >
> > Fabricio
> >
> >
> >
> >
> > ----- Original Message -----
> > From: "Rahul Aras" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, April 17, 2002 5:11 AM
> > Subject: ENC lookup problems
> >
> >
> > > Hi All ,
> > >
> > > I have a stateless session ejb which is NOT referencing any other
ejbs.
> I
> > > just wish to perform a JNDI lookup via ENC and this is how I am doing
> it.
> > I
> > > have successfully deployed it on Weblogic 6.1 server.
> > >
> > > Context ctx = new InitialContext();
> > > Object obj = ctx.lookup("java:comp/env/ejb/MyAdminHome");//throws an
> > > Exception
> > >
> > > BUT
> > >
> > > Object obj = ctx.lookup("MyAdminHome");//works fine
> > > .....
> > > .....
> > >
> > >
> > > But it gives me an Exception saying
> > >
> > > Unable to resolve comp/env/ejb/SMProCardSpendAdminHome Resolved:
> > 'comp/env'
> > > Unresolved:'ejb'
> > >
> > > The ejb-jar.xml looks like this
> > > <ejb-jar>
> > >     <enterprise-beans>
> > >         <session>
> > >         <ejb-name>MyAdminBean</ejb-name>
> > >         <home>com.abc.xyz.ejb.MyAdminHome</home>
> > >         <remote>com.abc.xyz.ejb.MyAdmin</remote>
> > >         <ejb-class>com.abc.xyz.ejb.MyAdminBean</ejb-class>
> > >         <session-type>Stateless</session-type>
> > >         <transaction-type>Container</transaction-type>
> > >      </session>
> > >     </enterprise-beans>
> > >  </ejb-jar>
> > >
> > > and the weblogic-ejb-jar.xml looks like this
> > >
> > > <weblogic-enterprise-bean>
> > >         <ejb-name>MyAdminBean</ejb-name>
> > >         <stateless-session-descriptor>
> > >                 <pool>
> > >
> > <max-beans-in-free-pool>100</max-beans-in-free-pool>
> > >
> > > <initial-beans-in-free-pool>5</initial-beans-in-free-pool>
> > >                 </pool>
> > >         </stateless-session-descriptor>
> > >     <jndi-name>MyAdminHome</jndi-name>
> > > </weblogic-enterprise-bean>
> > >
> > > Where am I faltering? Can anybody please point out? I saw the petstore
> > > weblogic deployment descriptor for the Customer session bean but
couldnt
> > > understand how the ENC lookup was working there.
> > >
> > > - Rahul
> > >
> > >
> >
>
===========================================================================
> > > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> > body
> > > of the message "signoff EJB-INTEREST".  For general help, send email
to
> > > [EMAIL PROTECTED] and include in the body of the message "help".
> >
> >
>
===========================================================================
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> > of the message "signoff EJB-INTEREST".  For general help, send email to
> > [EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to