Hello,

I'm having a terrible time trying to globally specify transactional attributes for the getDXO (gets the Data Object) method in all my entity beans. They all extend my base entity bean class and none of them override this method. If I put the @ejb.transaction in the base class XDoclet picks it up in the template includes it for each of my entity beans but it incorrectly includes the name of the base class in the <ejb-name> element. Now what I end up with is this:
<container-transaction >
<method >
<ejb-name>com.icsaward.award.server.eb.state.State</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction >
<method >
<ejb-name>ICSBaseEntityBean</ejb-name>
<method-intf>Local</method-intf>
<method-name>getDXO</method-name>
<method-params>
</method-params>
</method>
<trans-attribute>Supports</trans-attribute>
</container-transaction>


It's all caused by this part of the template:
<XDtEjb:forAllBeans>
<XDtEjb:ifIsAConcreteEJBean>
<XDtClass:forAllClassTags tagName="ejb:transaction">
<container-transaction <XDtId:prefixedId prefix="MethodTransaction"/>>
<method <XDtId:prefixedId prefix="MethodElement"/>>
<ejb-name><XDtEjb:ejbName/></ejb-name>
<XDtClass:ifHasClassTag tagName="ejb:transaction" paramName="method-intf">
<method-intf><XDtClass:classTagValue tagName="ejb:transaction" paramName="method-intf" values="Home,Remote,LocalHome,Local"/></method-intf>
</XDtClass:ifHasClassTag>
<method-name><XDtClass:classTagValue tagName="ejb:transaction" paramName="method-name" default="*"/></method-name>
</method>
<trans-attribute><XDtClass:classTagValue tagName="ejb:transaction" paramName="type"/></trans-attribute>
</container-transaction>
</XDtClass:forAllClassTags>
<XDtMethod:forAllMethods>
<XDtMethod:ifHasMethodTag tagName="ejb:transaction">
<XDtEjbIntf:ifIsInterfaceMethod>
<XDtEjbIntf:forAllInterfaceViewTypes>
<container-transaction <XDtId:prefixedId prefix="MethodTransaction"/>>
<method <XDtId:prefixedId prefix="MethodElement"/>>
<ejb-name><XDtEjb:ejbName/></ejb-name>
<method-intf><XDtEjbIntf:methodIntf/></method-intf>
<method-name><XDtEjbIntf:interfaceMethodName/></method-name>
<method-params>
<XDtParameter:forAllMethodParams>
<method-param><XDtParameter:methodParamType/></method-param>
</XDtParameter:forAllMethodParams>
</method-params>
</method>
<trans-attribute><XDtMethod:methodTagValue tagName="ejb:transaction" paramName="type"/></trans-attribute>
</container-transaction>
</XDtEjbIntf:forAllInterfaceViewTypes>
</XDtEjbIntf:ifIsInterfaceMethod>
</XDtMethod:ifHasMethodTag>
</XDtMethod:forAllMethods>
</XDtEjb:ifIsAConcreteEJBean>
</XDtEjb:forAllBeans>


The context gets set to the base entity bean when it iterates over all the methods and as a result the ejbName tag returns the base class name instead of the current class. I've tried using the concreteFullClassName tag in the template hoping that it would pull in the name of the concrete class instead of its ancestor but that didn't work. I'm sure this is a common problem but I'm stuck. What is the work-around?

--
Clifton C. Craig, Software Engineer
Intelligent Computer Systems -  A Division of GBG
2101 Embassy Drive
Lancaster, PA  17603

Phone:  717-295-7977 ext. 621
Fax:  717-295-7683
[EMAIL PROTECTED]
[EMAIL PROTECTED]



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to