Hi Bruce,

You will need to add <localinterface /> and <localhomeinterface/ > to your
xdoclet task.

It should be as simple as that.

Jan

-----Original Message-----
From: Bruce Crawford [mailto:[EMAIL PROTECTED] 
Sent: dinsdag 25 februari 2003 18:48
To: [EMAIL PROTECTED]
Subject: [Xdoclet-user] Problem generating Local Interface for Stateless
Session Bean usi ng Xdoclet 1.1.2


I have a Stateless Session Bean that is working using a Remote Interface.

However, on examination of the system design I noticed that it would never
be used outside of the App Server (JBoss) so I wanted to change it to using
a Local Interface.  Seemed a simple task, but I haven't been able to change
the tags properly to get Xdoclet to generate the Local Interface.

I haven't been able to find my snafu looking at forum discussions or
examples so if anyone there can point out the error of my ways it would be
appreciated.

My development baseline on both Linux Redhat 7.3 and Windows 2000 is:
        ant 1.5.1, xdoclet 1.1.2, java sdk-1.4.1_01, j2sdkee-1.3.1,
jboss-3.0.4_tomcat-4.1.12

A snippet of the code with tags is as follows:

package com.transdyn.dynac.bridge.agent;
import ...
/**
 * @ejb.bean name="PointDeviceAccess"
 *           display-name="PointDeviceAccess Bean"
 *           type="Stateless"
 *           local-jndi-name="ejb/PointDeviceAccessLocal"
 *           view-type="local"
 * @--ejb:transaction type="Required"
 */
public class PointDeviceAccessEJB implements SessionBean {
    /**
     * @ejb.interface-method view-type="local"
     */
    public Object getProperty( String propertyName ) { ... }
    /**
     * @ejb.create-method view-type="home"
     */
    public void ejbCreate() throws CreateException { ... }
    public void setSessionContext( SessionContext context ) throws
RemoteException { ... }
    public void ejbRemove() { ... }
    public void ejbActivate() { ... }
    public void ejbPassivate() { ... }
}

Changes from the working Remote Interface code are:
        using @ejb. vs. @ejb:   (as noted in one forum discussion)
        using local-jndi-name vs. jndi-name
        using view-type="local" vs. "remote"

My build.xml for the xdoclet task is:
   <target name="xdoclet-generate" depends="init">
      <taskdef
         name="ejbdoclet"
         classname="xdoclet.ejb.EjbDocletTask"
      >
         <classpath refid="xdoclet.path"/>
      </taskdef>
      
      <ejbdoclet
         sourcepath="${src.dir}"
         destdir="${build.generate.dir}"
         classpathref="base.path"
         excludedtags="@version,@author"
         ejbspec="${ejb.version}"
         mergedir="${src.resources.dir}/xdoclet"
         force="${xdoclet.force}"
      >
         <fileset dir="${src.dir}">
            <include name="**/*EJB.java"/>
         </fileset>
         
         <dataobject/>
         <remoteinterface/>
         <homeinterface/>
         <entitypk/>
         <entitybmp/>
         <entitycmp/>
         <deploymentdescriptor destdir="${build.dir}/META-INF"/>
         <jboss version="${jboss.version}"
            xmlencoding="UTF-8"
            typemapping="${type.mapping}"
            datasource="${datasource.name}"
            destdir="${build.dir}/META-INF"
            validateXml="false"
         />
      </ejbdoclet>
   </target>



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf _______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user
************************************************************************
The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorised. If you are not
an intended recipient, please notify the sender of this email 
immediately. You should not copy, use or disseminate the 
information contained in the email.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Capco.

http://www.capco.com
***********************************************************************

Reply via email to