Hi,
I have an interest in forcing XDoclet to use a certain interface as the return value from the create() method in the home interface file that it generates.
e.g. by default, XDoclet builds home interfaces for me where the create method looks like this:
public com.foo.SpecificAdapter1 create()
throws javax.ejb.CreateException, java.rmi.RemoteException public com.foo.SpecificAdapter2 create()
throws javax.ejb.CreateException, java.rmi.RemoteExceptionNow, in my case, SpecificAdapter1 and SpecificAdapter2 both implement an interface let's call com.foo.GenericInterface, and I want my EJB client to only refer to the GenericInterface aspects of these classes (should know nothing about SpecificAdapter1 and 2).
So, what I would really like is on a class-by-class basis to be able to set the return value of the create() method in the Home interface, so in the Home interfaces SpecificAdapter1Home and SpecificAdapter2Home, I get the same signature on the create() method:
public com.foo.GenericInterface create()
throws javax.ejb.CreateException, java.rmi.RemoteExceptionI cannot seem to find a way to do this via the existing XDoclet tags. I am sure this problem has been solved before but I can't find out how. Any suggestions on making this happen would be greatly appreciated.
BARRING a solution as I describe above, because there are only a few
of my EJBs that require this approach, I could define the home interfaces
manually rather than auto-generating them. It is less attractive than a
generated solution, but still doable. However, I tried using the @ejb.home
tag and setting generate="none" or generate="false" (doc is unclear on
correct values for this I think), yet XDoclet still generates the home interfaces.
Any ideas on why that is so would also be helpful to me. Here is a sample
of how my tags are set presently to try to avoid auto-generating the home
interfaces.
/**
* @CustomerFormAdapter Bean
*
* @ejb.bean
* name="CustomerFormAdapter"
* jndi-name="ejb/CustomerFormAdapter"
* type="Stateless"
* @ejb.home
* extends="com.icanon.ejb.FormBeanHomeInterface"
* local-extends="javax.ejb.EJBLocalHome"
* generate="none"
* @ejb.interface
* extends="com.icanon.ejb.FormBeanInterface,javax.ejb.EJBObject"
* local-extends="com.icanon.ejb.FormBeanLocalInterface,javax.ejb.EJBLocalObject"
*/
If it has some bearing, here is the ant build information as well:
<target name="ejbdoclet" depends="prepare">
<ejbdoclet
destdir="${build.gen-src.dir}"
ejbspec="2.0"
verbose="true"
force="false"
>
<fileset dir="${build.java.dir}" >
<include name="com/**/*.java"/>
<exclude name="com/icanon/pda/**"/>
</fileset> <remoteinterface/>
<localinterface/>
<homeinterface/>
<localhomeinterface/> <deploymentdescriptor
destdir="${build.meta-inf.dir}"
validatexml="true"
mergedir="fake-to-debug"
description="NEWZware Deployment">
</deploymentdescriptor> <jboss
version="3.2"
destdir="${build.meta-inf.dir}"
validatexml="true"
/> </ejbdoclet>
</target>Thanks in advance for any assistance.
Jim
------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
