After a great deal of frustration, I found that moving the session
subtask to occur before ther remoteinterface subtask, the parameters
would be populated.
Now, I've found that when using the attributes, the others go missing
when you use one. I've created the simplest test case that I can think of:
ActionSetServiceBean.java (Source file)
-------------
import javax.ejb.SessionBean;
/**
*
* @ejb.bean name="ActionSetService"
* type="Stateless"
*/
public class ActionSetServiceBean implements SessionBean {
/**
* @ejb.auth
* type="both"
* parameter-object=”code”
*
*/
public void findFullByCode(String code) {
}
}
session-custom.xdt (merge file)
-------------------------
<XDtMethod:forAllMethods>
// <XDtMethod:methodTagValue tagName="ejb.auth"/>
<XDtMethod:ifHasMethodTag tagName="ejb.auth">
// <XDtMethod:methodTagValue tagName="ejb.auth"/>
<XDtMethod:ifMethodTagValueEquals tagName="ejb.auth"
paramName="type" value="both">
// <XDtMethod:methodTagValue tagName="ejb.auth"/>
</XDtMethod:ifMethodTagValueEquals>
// <XDtMethod:methodTagValue tagName="ejb.auth"/>
</XDtMethod:ifHasMethodTag>
</XDtMethod:forAllMethods>
build.xml (ant build script)
----------------------------------
<project name="TestXDoc" default="run">
<path id="xdoclet.classpath">
<fileset dir="xdoclet"/>
</path>
<target name="run">
<delete dir="gensrc"/>
<taskdef name="ejbdoclet"
classname="xdoclet.modules.ejb.EjbDocletTask"
classpathref="xdoclet.classpath">
</taskdef>
<ejbdoclet destdir="gensrc"
ejbspec="2.0"
force="false"
verbose="true"
mergeDir="merge">
<fileset dir="src">
<include name="**/*.java" />
</fileset>
<session/>
</ejbdoclet>
</target>
</project>
Create a directory, with subdirectories src, merge and xdoclet. Place
the build.xml in the directory, ActionSetServiceBean.java in the src
directory, and session-custom.xdt in the merge directory. Put xdoclet
binaries and a copy of ejb.jar (containing the J2EE ejb classes) into
the xdoclet directory. Run the ant script in the directory, will create
gensrc/ActionSetServiceSession.java. The output will contain comments:
// type="both" parameter-object=”code”
// type="both" parameter-object=”code”
// type="both"
// type="both"
I was expecting the comments to be:
// type="both" parameter-object=”code”
// type="both" parameter-object=”code”
// type="both" parameter-object=”code”
// type="both" parameter-object=”code”
Why do the comments lose the parameter-object tags after the
<XDtMethod:ifMethodTagValueEquals tagName="ejb.auth" paramName="type" value="both"> markup? Am I thinking about this in a completely wrong way?
Cheers,
Lloyd Colling
******************************************************************************************
'This e-mail message is intended solely for the person to whom it is addressed
and may contain confidential
or privileged information. If you have received it in error, please notify [EMAIL PROTECTED] and
destroy this e-mail and any attachments. In addition, you must not disclose, copy, distribute or take any
action in reliance on this e-mail or any attachments. Any views or opinions presented in this e-mail are
solely those of the author and do not necessarily represent those of the company. When addressed to our
customers, any quotations contained in this e-mail are subject to contract and
are on the terms of The
Company's standard Conditions, a copy of which is available on request. Any
errors or omissions in any
quotations or other information issued by The Company shall be subject to
correction without any liability
on the part of The Company. Due to the nature of Internet communications, DCS
cannot guarantee that this
communication, or any attachments, do not contain software viruses. We have
taken every precaution to
minimize this probability but cannot accept any liability for damage which you
may sustain as a result of
software viruses. We recommend you carry out your own virus checks before
opening attachments.'
DCS Transport & Logistics Solutions Ltd.
Registered office: Newstead House, Lake View Drive, Sherwood Park, Annesley,
Nottinghamshire, NG15 0DT
Registered in England no: 3373490
******************************************************************************************
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
xdoclet-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user