• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

JNDI not found for local entity beans in RI server

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,

I am stuck with one problem in using RI server.The JNDI lookup is getting failed for local entity bean where as it is working fine for remote interfaces. Is there any EXTRA seeting for JNDI in RI server for accessing local interfaces?

Please somebody help.

Thanks,
Prashant
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I'm also stuck with that problem. How can you specify the JNDI for a local entity bean.

Lahiru
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you post a sample of your code?
 
Prashant Neginahal
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is my code. I assume nothing wrong with th code because we are able to deploy it.

Component Interface
------------------------------------------
public interface Client extends EJBLocalObject{
public String getId();

public void setName(String s);
public String getName();
}
--------------------------------------


Home Interface
----------------------------------
public interface ClientHome extends EJBLocalHome{
public Client create(String id, String num) throws CreateException;

public Client findByPrimaryKey(String name) throws FinderException;
}
--------------------------------------------

Bean Class
-------------------------------------------

public abstract class ClientBean implements EntityBean{

EntityContext context = null;

public abstract void setId(String s) ;
public abstract String getId() ;

public abstract void setName(String s) ;
public abstract String getName() ;

public void ejbActivate(){
}

public void ejbPassivate(){
}

public void ejbRemove(){
}

public void setEntityContext(EntityContext conx){
context=conx;
}
public void unsetEntityContext(){
}

public void ejbLoad(){
}

public void ejbStore(){
}

public String ejbCreate(String id, String name) throws CreateException{
this.setId(id);
this.setName(name);
return null;
}

public void ejbPostCreate(String id, String num) throws CreateException{
}
}
------------------

Thanks,
Prashant
 
Prashant Neginahal
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please, somebody have a look on this problem.

Lahiru, did u get the solution? Please share with me.

Thanks,
Prashant
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think there is nothing wrong with your ejb code. It must be in the way you are accessing your local entity beans from the client. Try this out:

Object objref = ic.lookup("local:ejb/xxxxxxxx/ClientHome");

where xxxxxx is your package structure (ejb/myjava/...)

Hope it helps.
 
Prashant Neginahal
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
somebody please tell me how look up for local beans using RI.

Thanks,
Prashant
 
Could you hold this kitten for a sec? I need to adjust this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic