This content has been marked as final.
Show 1 reply
-
1. Re: can Xdoclet create methods in the remote interfaces?
mmindenhall Jul 8, 2005 1:03 PM (in response to phantandy)I'm not certain this is what you are asking, but here is an example from a session bean. If you are only generating the remote interface, change view-type from "both" to "remote".
This is the XDoclet stuff in the class level javadoc:/** * @ejb.bean name="Protocol" * display-name="Name for Protocol" * description="Converts Message objects to and from transport * protocol (currently XML)." * jndi-name="ejb/Protocol" * local-jndi-name="ejb/ProtocolLocal" * type="Stateless" * view-type="both" */
Here is an example business method. You need to have the @ejb.interface-method XDoclet tag for each method./** * This method encodes the Message object into an XML string. * * @param msg The Message object to encode. * @return The encoded XML string. * * @ejb.interface-method view-type = "both" */ public String encode(Message msg) { // logic }
And for ejbCreate, you need the following:/** * * @throws CreateException * @ejb.create-method */ public void ejbCreate() throws CreateException { // logic }