Copied to xdoclet-user, where it more properly belongs.
Just because you ask four times, it won't get answered any quicker;
asking in the right place may have better results ;-)

On Wed, 2006-07-19 at 07:01, chaithanya xdoclet wrote:
> Hi,
> When i run xdoclet, the value of the property <ejb-class> generated by
> xdoclet in ejb-jar.xml  is changing like the following...
> 
>   <ejb-class>xyz.abc..xxxselection.XXXSelectionSession</ejb-class>
> 
> But i want it to be 
> 
>   <ejb-class>xyz.abc..xxxselection.XXXSelectionBean</ejb-class>
> 
> Every time , i'm manually changing it to Bean
> 
> Can any one tell me how to configure xdoclet so that i can avoid this
> everytime i run xdoclet

You can't.  That's how it's designed to work.

> I use the following xdoclet tags in my XXXBean class 
> /**
>  * 
>  * 
>  * @ejb.bean name="XXXSelection" type="Stateless" view-type="both"
>  *           transaction-type="Bean"  

If your bean class is named XXXBean and it's a stateless session bean as
indicated in the @ejb.bean tag, then XDoclet will generate a subclass
named XXXSession that adds the required EJB lifecycle methods (e.g. the
no-argument ejbCreate method), and uses the generated subclass as the
bean class in the ejb-jar.xml.  This is the behaviour you are seeing,
and you shouldn't be manually changing the ejb-class entry back again as
you don't need to.

>  * @ejb.transaction type="NotSupported"
> 
>  * @ejb.interface extends="javax.ejb.EJBObject"
>  *                local-extends="javax.ejb.EJBLocalObject"
> remote-pattern="{0}"
>  *                local-pattern="{0}Local"
> 
>  * @ejb.home extends="javax.ejb.EJBHome"
> local-extends="javax.ejb.EJBLocalHome"
>  *           remote-pattern="{0}Home" local-pattern="{0}LocalHome"
> 
>  * @ejb:env-entry name="ejb/BeanFactoryPath" type="java.lang.String"
>  *  value="applicationContext.xml"
>  */

You didn't include the rest of your class' code, but if as I suspect you
still have ejbCreate, ejbActivate and ejbPassivate methods in there you
can remove those and XDoclet will add them again in the generated
subclass (you wil need to declare your bean class as abstract since it
won't be implementing all the standard interface's methods).  Smaller
source files means less code for you to maintain :-)

In the same way, entity beans will generate a BMP or CMP subclass
according to the specified persistence method (and don't necessarily
need to include ejbLoad/ejbStore or postCreate methods).


Andrew.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
xdoclet-devel mailing list
xdoclet-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to