This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark ""EJB" Monson-Haefel JBoss Example ex06_3" Watch ""EJB" Monson-Haefel JBoss Example ex06_3" New topic
Author

"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".
Thanks,
-Barry
[ 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
Greenhorn

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...
<local-home>com.titan.customer.CustomerHomeLocal</local-home>
<local>com.titan.customer.CustomerLocal</local>
---------------------------------------------------------------
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: http://aspose.com/file-tools
 
subject: "EJB" Monson-Haefel JBoss Example ex06_3
 
Similar Threads
Select Clause Returning CMR Field
HFEJB P406 - Why EJBQL SELECT Cant Return Single Valued CMR field?
Which approach is right ??
Address-has-one-Customer with multiplicity many using foreign-key mapping
string function LOCATE of EJB-QL