I'm equally confused with this new change.  This broke alot of my
existing stuff (which I'm usually okay with).

I'm specifically talking about the recent 06-jan-02 changes in:

/xdoclet/core/src/xdoclet/ejb/tags/HomeTagsHandler.java::getCompNameFor()

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

Reply via email to