David, Your advice got me through the rough spots. Thanks! I have a few comments, and a possible enhancement (assuming the enhancement doesn't already exist, possibly in an alternate form).
First, when you talk about another bean "in the same ejb-jar.xml", does this also imply that the other bean must be contained in the same jar file? Originally I was trying to package them up separately, then I got your email and I tried to add the ejb-link element to the session bean's ejb-jar.xml. Things didn't work until I combined the session and entity beans into the same jar file. Second, it seems that ejb-ref-name really needed to be "ejb/" followed by the disired EJB's Home interface name. I don't think I got this to work any other way, but of course, I'm occasionally wrong when I question your advice :) and I was trying a lot of different things. Now, regarding an OpenEJB enhancement. In the Hello World CMP example, the openejb deploy tool queries the user interactively to specify the JDBC resource to use. I like to use Ant, but Ant wont let me interact with the deploy tool (unless there is an Ant feature I'm not aware of). Others might not want to use Ant but might want to automate this process in other ways. Is there a command line argument, or some other mechanism, by which this linking can be specified in order to avoid the need for interaction with the deploy tool? I understand that the deploy tool is simply a handy way of producing an openejb-jar.xml file, but using the deploy tool is pretty handy, and probably much less error prone than manually creating and editing the openejb-jar.xml files. Just a thought. --- David Blevins <[EMAIL PROTECTED]> wrote: > Hi Clint, > > Your usage of ejb-ref-name is perfectly legitimate. The issue is that > you don't have the ejb-link element pointing to another bean in the same > ejb-jar.xml > > <ejb-ref> > <ejb-ref-name>ejb/CabinEJB</ejb-ref-name> > <ejb-ref-type>Session</ejb-ref-type> > <home>com.titan.CabinHome</home> > <remote>com.titan.Cabin</remote> > <ejb-link>CabinEJB</ejb-link> > </ejb-ref> > > Requiring any beans that reference each other to be in the same > ejb-jar.xml is completely compliant with the EJB spec. In fact, the > spec says, "The value of the ejb-link element must be the ejb-name of an > enterprise bean in the same ejb-jar file or in another ejb-jar file in > the same J2EE application unit." We don't support J2EE .ear files, so > the later won't work for us. > > In the EJB 2.0 spec, they added ability to link beans from other jars > using this syntax: > <ejb-link>../products/product.jar#ProductEJB</ejb-link> > > We haven't implemented this yet, but is something that will be required > for 2.0 or 2.1 compliance. For now, it's just as easy to include both > beans in the same ejb-jar.xml > > I've attached the ejb-jar.xml for our test suite, it is a great example > of how to use the various elements of an ejb-jar.xml > > Let us know if you run into any more problems or have more questions. > > -David > ===== Clinton S. Olson - Owner, Steven's Pass Carving Elvises http://home.bak.rr.com/fl/fl.htm "The two most important things in life are good friends and a strong bullpen" -- Bob Lemon, former manager Royals/White Sox/Yankees __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ http://OpenEJB.sf.net OpenEJB-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/openejb-user