The moose likes JBoss/WildFly and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark ""EJB" Monson-Haefel JBoss Example ex06_3" Watch ""EJB" Monson-Haefel JBoss Example ex06_3" New topic

"EJB" Monson-Haefel JBoss Example ex06_3

Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
I have just tried the example ex06_3 in Richard Monson-Haefel's EJB JBoss Workbook. I'm using jboss3.2.2-RC4. It failed to deploy until I created the CustomerHomeLocal and CustomerLocal interfaces.
Anybody have any idea why, for this simple CMP example, these two interfaces are now required in addition to the AddressHomeLocal and AddressLocal interfaces? The relationship is "Customer has an Address" not "Address has a Customer".
[ October 31, 2003: Message edited by: Barry Gaunt ]

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Peter Otto

Joined: Nov 17, 2003
Posts: 1
Yes, to get this prgram to work you need to add
1.) com.titan.customer.CustomerHomeLocal defined as follows....
public interface CustomerHomeLocal extends EJBLocalHome {
public CustomerLocal create(Integer id)
throws CreateException,EJBException;
public CustomerLocal findByPrimaryKey(Integer pk)
throws FinderException, EJBException;
2.)Also you need com.titan.customer.CustomerLocal defined as follows.....
public interface CustomerLocal extends EJBLocalObject {
public AddressLocal getHomeAddress();
public void setHomeAddress(AddressLocal address);
3.)Third and lastly, you need to edit the ejb-jar.xml file and ADD two line as follows...
You are right. I have no idea why we need to do this. It just doesn't make sense. Do you think this problem is only for JBoss? I looked at their docs off their web site. (Downloaded it for $10, definelty worth it) and I found no help there as of yet.
I agree. Here's the link:
subject: "EJB" Monson-Haefel JBoss Example ex06_3
It's not a secret anymore!