Hi, What I can change is adding Local in jndi-name of Company even when its is view-type="local" So that the jndi-name in reference will NEED Local. When you migrate Company to "both", you will need no change.
Anyway, do you have to specify ejb-local-reference-description when using ejb-ref ? You got a ejb-link for this reference in ejb-jar.xml. This one should give you the "direct" (meaning not going to jndi-name but ejb-name) access to the Component inside your ejb JAR. I would think the jndi remapping inside weblogic.xml (and jboss, ....) is not needed when using ejb-ref. For that you even don't need a ref-name in ejb:ejb-ref Instead of * @ejb:ejb-ref ejb-name="fc/Company" ref-name="fc/CompanyLocal" view-type="local" * @weblogic:ejb-local-reference-description ejb-ref-name="ejb/fc/CompanyLocal" jndi-name="ejb/fc/CompanyLocal" , can you try * @ejb:ejb-ref ejb-name="fc/Company" view-type="local" It works fine with me on Jboss, can you give feedback on Weblogic. ==> If you need to change Company from local to both, you don't need ANY changes except Company ejb:bean ==> If you need to change the access type, then change "local" to "remote" in ejb:ejb-ref You only need these jndi remapping when going from a jar to another jar. And even in this case if the two jars are in a same ear you could (xdoclet does not support it afaik) still use ejb-link to another jar (see the spec somewhere) ==> If you move Company "far away", then * @ejb:ejb-external-ref ejb-name="fc/Company" type="..." home="..." remote="..." * @weblogic:ejb-remote-reference-description ejb-ref-name="ejb/fc/Company" jndi-name="ejb/fc/CompanyJNDI" In special cases only you don't want the direct ejb-link mapping and use the power of jndi remapping inside vendor-ejb.xml. And this is for these cases ONLY that local-ref stuffs have been introduced in vendor-ejb.xml. ==> If you are working in a "complex" environment :) * @ejb:ejb-ref ejb-name="fc/Company" ref-name="fc/CompanyREF" view-type="local" * @weblogic:ejb-local-reference-description ejb-ref-name="ejb/fc/CompanyREF" jndi-name="ejb/fc/AnotherCompanyJNDI" And here, be sure that merging feature will be needed sooner or later ;) You are not the first one on this issue, I begin to think that maybe I am wrong here. If I am not, maybe a chapter in the doco could explain these points... Vincent > I'm specifically talking about the recent 06-jan-02 changes in: > > /xdoclet/core/src/xdoclet/ejb/tags/HomeTagsHandler.java::getCo > mpNameFor() > > 1.16 (vharcq 06-Jan-02): if( > type.equals( "local" > ) && isLocalEjb( clazz ) && isRemoteEjb( clazz ) ) > 1.16 (vharcq 06-Jan-02): compName = > compName + LOCAL_SUFFIX; > > > What I don't get is now the ref-name now is not always known > - it depends on whether you are generating remote/local/both! > > For example (this used to work): > > * @ejb:ejb-ref ejb-name="fc/Company" > ref-name="fc/CompanyLocal" view-type="local" > * @weblogic:ejb-local-reference-description > ejb-ref-name="ejb/fc/CompanyLocal" jndi-name="ejb/fc/CompanyLocal" > > This worked because you always knew that the ref-name used in > CompanyUtil.getLocalHome() was always "fc/CompanyLocal" > > After the change to getCompNameFor(), now if you only > generate view-type="local" the COMP_NAME in the > CompanyLocalHome will be "comp:env/ejb/Company" and not > "comp:env/ejb/CompanyLocal" like it was previously. You > don't know what to use for ref-name, which means you don't > know what to use for @weblogic:... ejb-ref-name because you > have to know whether or not the bean you are referencing has > view-type="local" or view-type="both" on it. This doesn't > seem right? > So now it seems that I would need the following: > > * @ejb:ejb-ref ejb-name="fc/Company" view-type="local" > * @weblogic:ejb-local-reference-description > ejb-ref-name="ejb/fc/Company" jndi-name="ejb/fc/CompanyLocal" > > > But if I come along later and change Company @ejb:bean to > view-type="both" then CompanyLocalHome.COMP_NAME will be > "comp:env/ejb/CompanyLocal" which means I have to change all > of my @weblogic:ejb-local.... ejb-ref-name tags. This > doesn't seem right. > > Am I missing something or does this change just break a bunch > of stuff? > Or is the weblogic template need to use the same sort of > stuff that's in the home-local.j, that is: > > COMP_NAME="java:comp/env/<XDtEjbHome:compName > prefixWithEjbSlash="true" type="local"/>"; > > so that the "Local" will be automagically appended in the > weblogic dd to match the automagically appended "Local" in > the ejb-jar.xml > > If I'm missing something or using the tags incorrectly, > please let me know ASAP! > > Thanks, > > Glenn > > On Thu, 2002-01-10 at 04:28, Vincent Harcq wrote: > > Several solutions, one could be to add a local-jndi-name to > > SequenceGenerator > > ejb:bean. > > > > Another for JBoss could be to change to have > > * @jboss:ejb-ref-jndi > > * ref-name="ejb/SequenceGeneratorLocal" > > * jndi-name="SequenceGeneratorLocalHome" > > > > The problem is that you can have in the same bean > > * @ejb:ejb-ref > > * ejb-name="SequenceGenerator" > > * view-type="local" > > and > > * @ejb:ejb-ref > > * ejb-name="SequenceGenerator" > > * view-type="remote" > > > > And there is no way for xdoclet to know that you have or not > > > > In simple cases you don't need jboss:ejb-ref-jndi then the > ejb:ejb-ref > > is > > enough > > and the jboss.xml has to find himself what to do. > > > > > > > * @weblogic:ejb-local-reference-description > > > * ejb-ref-name="ejb/SequenceGeneratorLocal" > > > * jndi-name="SequenceGeneratorLocalHome" > > > * > > > > Here ok there is a bug I guess, the Local should be added > > automatically I don't work with Weblogic, is there a > > weblogic:ejb-reference-description ? If yes then ok Local should be > > added automatically. > > > > > > > > >===== Original Message From "Shaw, Chris" > <[EMAIL PROTECTED]> ===== > > >Hi, > > > > > >Regarding this (and several other things I've mentioned), I've put > > >the application [it's only small] at > > >http://www.geocities.com/cnsxxx9/ so it should allow you > to reproduce > > >the errors (or point out to me that there is no error if I've done > > >something wrong). > > > > > >Regards > > > > > >Chris > > >-=-=- > > > > > >PS - there's 2 ugly-hack (but small) Perl scripts in there to fix > > >some invalid XML...in case it looks like the > self-referencing error > > >isn't being reproduced. > > > > > >-----Original Message----- > > >From: Shaw, Chris > > >Sent: 09 January 2002 15:24 > > >To: '[EMAIL PROTECTED]' > > >Subject: ejb-ref-name and 'Local' appended > > > > > > > > >Hi (me again) > > > > > >Something else I've come across which is strange...(maybe?) > > > > > >I have the following at the top of my Session Bean.... > > > > > > * > > > * @ejb:ejb-ref > > > * ejb-name="SequenceGenerator" > > > * view-type="local" > > > * > > > * @weblogic:ejb-local-reference-description > > > * ejb-ref-name="ejb/SequenceGenerator" > > > * jndi-name="SequenceGeneratorLocalHome" > > > * > > > * @jboss:ejb-ref-jndi > > > * ref-name="ejb/SequenceGenerator" > > > * jndi-name="SequenceGeneratorLocalHome" > > > > > > > > >which creates the following in ejb-jar.xml > > > > > > <ejb-local-ref> > > > <ejb-ref-name>ejb/SequenceGeneratorLocal</ejb-ref-name> > > > <ejb-ref-type>Entity</ejb-ref-type> > > > > <local-home>ecb.db.SequenceGeneratorLocalHome</local-home> > > > <local>ecb.db.SequenceGeneratorLocal</local> > > > <ejb-link>SequenceGenerator</ejb-link> > > > </ejb-local-ref> > > > > > >The problem? > > >If I use an entity bean then there is no problem...e.g > > > ejb-ref-name="ejb/Person" --> > > ><ejb-ref-name>ejb/Person</ejb-ref-name> > > >but when I use a session bean reference (and the fact that > it is a session > > >bean I guess *could* just be co-incidence because it is > only my SessionBeans > > >that refer to other beans....though it's consistent at least) > > >then I get the following: > > > ejb-ref-name="ejb/SequenceGenerator" --> > > ><ejb-ref-name>ejb/SequenceGeneratorLocal</ejb-ref-name> > > >ie 'Local' gets appended to the end > > > > > >where does this 'Local' come from? (it's screwing up my > deployment at > > >the moment...because 'Local' is is -not- appended to the > ejb-ref-name > > >in either jboss.xml or to weblogic-ejb-jar.xml...only in > ejb-jar.xml) > > > > > >Thanks > > > > > >Chris > > >-=-=-= > > > > > >Any e-mail message from the European Central Bank (ECB) is sent in > > >good faith > > but shall neither be binding nor construed as constituting a > > commitment by the > > ECB except where provided for in a written agreement. > > >This e-mail is intended only for the use of the recipient(s) named > > >above. Any > > unauthorised disclosure, use or dissemination, either in > whole or in > > part, is > > prohibited. > > >If you have received this e-mail in error, please notify the sender > > immediately via e-mail and delete this e-mail from your system. > > > > > > > > >_______________________________________________ > > >Xdoclet-user mailing list > > >[EMAIL PROTECTED] > > >https://lists.sourceforge.net/lists/listinfo/xdoclet-user > > > > > > > > _______________________________________________ > > Xdoclet-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/xdoclet-user > > > > _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
