• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

How to implement Home Method in Entity Bean?

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


Above is code for home interface and bean class
in Home i have independent home method getAllEmpNames
in bean i have ejbHomeGetAllEmployeeNames for getAllEmpNames
ejbHomeGetAllEmployeeNames uses ejbSelectGetAllEmpNames method.

First of all i want to know is i am using correct procedure or there is something missing.
Second why it throws error.
 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry for duplicate post.
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

In home interface, in your case return type should be Collection not just String.


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

In Bean,


//Query for ejbSelectGetAllEmpNames SELECT OBJECT(m) FROM Employee m
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

//if Return EJBs Of Type is Remote
/*then at deploy time it says RemoteException Error processing ejb jar compilation failed*/
Should have remote interface for the Entity Bean. In your case, it should be Remote, because you are returning the Collection obtained from ejbselect method to a remote client

//if Return EJBs Of Type is None
If you give 'None' or 'Local', it will take it as 'Local'

Hope this reply helps you to resolve issues. If i am wrong please correct me.
[ February 19, 2007: Message edited by: Suresh Babu Shanmugam ]
 
get schwifty. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic