This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes About Home methods in EJB2.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "About Home methods in EJB2.0" Watch "About Home methods in EJB2.0" New topic
Author

About Home methods in EJB2.0

georgejk
Greenhorn

Joined: Jul 29, 2002
Posts: 24
I would like to know something more about the Home Methods introduced in EJB2.0.
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
See this Javaworld article.
Dave Landers
Ranch Hand

Joined: Jul 24, 2002
Posts: 401
These are methods you put on your Entity bean Home interface, and implement them in the EntityBean implementation class.
They are for methods that apply to beans of that type, but are not specific to any instance.
For example, say you have an Address entity, and for some reason you need a method to return the count of all addresses in a particular city. You could put a getCountByCity(String city) method on the AddressHome.
Rick Hightower
Author
Ranch Hand

Joined: Feb 20, 2002
Posts: 350
Here is an interesting article on home methods...
Home Methods

...
public interface Home extends javax.ejb.EJBHome {
public String hello() throws RemoteException;
public int add(int a, int b) throws RemoteException;
...



...
public class HelloBean extends EntityBean {
public String ejbHomeHello()
{
return "Hello, world";
}
public int ejbHomeAdd(int a, int b)
{
return a + b;
}
...


Rick Hightower is CTO of Mammatus which focuses on Cloud Computing, EC2, etc. Rick is invovled in Java CDI and Java EE as well. linkedin,twitter,blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: About Home methods in EJB2.0
 
Similar Threads
The version of EJB again become as an issue
reg. ejb2.0
choosing between home business methods and finders
resouce-local and JPA transactions
Compile and deploy ejb2.0 on weblogic 6.0