[ 
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1634?page=all ]

R. Lemos updated XDT-1634:
--------------------------

    Attachment: xdoclet-05-overridableenventry.patch

Although several files were modified, two among them are the most important 
(where the change actually lies):

modules/ejb/src/xdoclet/modules/ejb/env/EnvTagsHandler.java
modules/ejb/src/xdoclet/modules/ejb/dd/resources/ejb-body.xdt

The key point is to track which env-entries were already processed, based on 
its name.

The main change is in 
xdoclet.modules.ejb.env.EnvTagsHandler#forAllTagsInternal, where the env-entry 
tags were captured in 3 loops (all tags in a class, all tags in all methods and 
all tags in all fields). Each capture step considers the super classes of the 
current class. The proposed patch surrounds these loops with a loop for each 
class in the class hierarchy. The inner loops were in turn changed to not take 
superclasses into account (since the outer loops already takes care of this).

For each tag that is about to be generated, the keyProperty is checked against 
a HashSet to verify that it was not generated before.

Hope the this works for all. It works for me.

[]'s
R. Lemos

> Overridability for @ejb.env-entry
> ---------------------------------
>
>          Key: XDT-1634
>          URL: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1634
>      Project: XDoclet
>         Type: Improvement

>   Components: EJB Module
>     Versions: 1.2.3
>     Reporter: R. Lemos
>     Assignee: xdoclet-devel (Use for new issues)
>     Priority: Minor
>  Attachments: xdoclet-05-overridableenventry.patch
>
> Original Estimate: 1 hour
>         Remaining: 1 hour
>
> Currently, there is no possibility to declare an @ejb.env-entry in an 
> enterprise bean and override its value in a subclass.
> For example:
> /**
>  * @ejb.env-entry
>  *   name = "strategy"
>  *   type = "java.lang.String"
>  *   value = "StrategyA"
>  */
> public class SuperBean implements SessionBean { ... }
> /**
>  * @ejb.env-entry
>  *   name = "strategy"
>  *   type = "java.lang.String"
>  *   value = "StrategyB"
>  */
> public class SubBean extends SuperBean { ... }
> It would be nice if the ejb-jar.xml file could be generated with the 
> following contents
> <session>
>   <ejb-name>Super</ejb-name>
>   ...
>   <env-entry>
>     <env-entry-name>strategy</env-entry-name>
>     <env-entry-type>java.lang.String</env-entry-type>
>     <env-entry-value>StrategyA</env-entry-value>
>   </env-entry>
>   ...
> </session>
> <session>
>   <ejb-name>Sub</ejb-name>
>   ...
>   <env-entry>
>     <env-entry-name>strategy</env-entry-name>
>     <env-entry-type>java.lang.String</env-entry-type>
>     <env-entry-value>StrategyB</env-entry-value>
>   </env-entry>
>   <!-- no other env-entry with env-entry-name == "strategy" -->
>   ...
> </session>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
xdoclet-devel mailing list
xdoclet-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to