xDoclet EJB 的问题,我已经晕了!!!

05-03-31 rrlove

我在开发EJB时用到了xDoclet EJBTask中的subTask <entityfacade/><remotefacade/>,但在第一次生成entity bean 的session facade bean时生成的是一个骨架类,需要再运行一次EJBTask任务,但第二次不能生成session facade bean 的Locla/Remote interface ,请求高手指点或发个例子给我看看.包括build.xml

linux_china
2005-03-31 17:48

<!-- set the project's classpath -->

<path id="project.classpath">

<fileset dir="${project.lib}">

<include name="*.jar"/>

<include name="**/*.jar"/>

</fileset>

<pathelement location="${project.build.classes}"/>

</path>

<!-- define some custom task target -->

<target name="myTaskDef" description="define custom task">

<taskdef name="ejbdoclet" classname="xdoclet.modules.ejb.EjbDocletTask" classpathref="project.classpath"/>

</target>

<!-- generate and package ejb component -->

<target name="ebjComponentPackage" depends="myTaskDef" description="generate ejb component">

<delete>

<fileset dir="${project.build.classes}/META-INF" includes="*.xml"/>

</delete>

<ejbdoclet destdir="${project.src}" excludedtags="@version" ejbspec="2.0" force="true">

<fileset dir="${project.src}">

<include name="**/*Bean.java"/>

<include name="**/*MDB.java"/>

</fileset>

<packageSubstitution packages="ejb,bean" substituteWith="interfaces"/>

<remoteinterface/>

<localinterface/>

<homeinterface/>

<localhomeinterface/>

<deploymentdescriptor destdir="${project.src}/META-INF" xmlencoding="${project.encoding}"/>

<jboss version="3.0" datasource="java:OracleDS" typemapping="Oracle9i" destdir="${project.src}/META-INF" xmlencoding="${project.encoding}"/>

<weblogic version="7.0" datasource="jdbc/OracleDS" destdir="${project.src}/META-INF" xmlencoding="${project.encoding}"/>

</ejbdoclet>

</target>

linux_china
2005-03-31 17:50

 <!-- set the project's classpath -->
    <path id="project.classpath">
        <fileset dir="${project.lib}">
            <include name="*.jar"/>
            <include name="**/*.jar"/>
        </fileset>
        <pathelement location="${project.build.classes}"/>
    </path>

    <!-- define some custom task target -->
    <target name="myTaskDef" description="define custom task">
        <taskdef name="ejbdoclet" classname="xdoclet.modules.ejb.EjbDocletTask"  classpathref="project.classpath"/>
    </target>

 <!-- generate and package ejb component  -->
    <target name="ebjComponentPackage" depends="myTaskDef" description="generate ejb component">
        <delete>
            <fileset dir="${project.build.classes}/META-INF" includes="*.xml"/>
        </delete>
        <ejbdoclet destdir="${project.src}" excludedtags="@version" ejbspec="2.0" force="true">
            <fileset dir="${project.src}">
                <include name="**/*Bean.java"/>
                <include name="**/*MDB.java"/>
            </fileset>
            <packageSubstitution packages="ejb,bean" substituteWith="interfaces"/>
            <remoteinterface/>
            <localinterface/>
            <homeinterface/>
            <localhomeinterface/>
            <deploymentdescriptor destdir="${project.src}/META-INF" xmlencoding="${project.encoding}"/>
            <jboss version="3.0" datasource="java:OracleDS" typemapping="Oracle9i" destdir="${project.src}/META-INF" xmlencoding="${project.encoding}"/>
            <weblogic version="7.0" datasource="jdbc/OracleDS" destdir="${project.src}/META-INF" xmlencoding="${project.encoding}"/>
        </ejbdoclet>

    </target>
<p>

linux_china
2005-03-31 17:52

xml 文件居然显示不了 :(

给你一个build.xml作为附件吧!linux_china4563T5YnJk.xml

rrlove
2005-03-31 17:58

终于有个人回复我了,你发的文件看不见呀,linux_china!!!!虽然没有看见还是要谢谢你。

2Go 1 2 下一页