For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 3 replies, 3 voices, and was last updated 21 years, 1 month ago by
mahy.
-
AuthorPosts
-
mahyMemberWe are using MyEclipse version 3.8.4 and want to use an abstract SessionBean superclass that implements ejbActivate(), ejbCreate() … nothing special.
But if we do so xDoclet doesn’t generate any create() method in the home interfaces and we cannot deploy the beans. Can anybody help us pls?!
Thanks
July 13, 2005 at 9:16 am #232886
Riyad KallaMemberI’ll ask our EJB guy to take a look.
July 14, 2005 at 1:38 am #232953
GregMemberYou may have to put xdoclet tags in your superclass files as well. If you continue to have trouble, post a couple of sample source files complete with xdoclet tags and we can try to help out.
July 14, 2005 at 3:25 am #232956
mahyMemberOk, this is our abstract super class that implements the SessionBean interace and also the ejbCreate() method:
public abstract class AbstractSessionBean implements SessionBean { private SessionContext context; public AbstractSessionBean() { super(); } public void ejbActivate() throws EJBException, RemoteException { } public void ejbPassivate() throws EJBException, RemoteException { } public void ejbRemove() throws EJBException, RemoteException { } public void setSessionContext(SessionContext newContext) throws EJBException { context = newContext; } /** * @ejb.create-method */ public void ejbCreate() throws CreateException { } }An implementing SessionBean looks like:
/** * * @ejb.bean name="MySession" * display-name="Name for MySession" * description="Description for MySession" * jndi-name="ejb/MySession" * type="Stateless" * view-type="remote" */ public class MySessionBean extends AbstractSessionBean { public MySessionBean() { super(); } /** * An example business method * * @ejb.interface-method view-type = "remote" * * @throws EJBException Thrown if method fails due to system-level error. */ public void replaceWithRealBusinessMethod() throws EJBException { // rename and start putting your business logic here } }xDoclet is generating the remote and home interfaces for both AbstractSessionBean and MySessionBean. AbstractSessionHome gets a create method:
public interface AbstractSessionHome extends javax.ejb.EJBHome { public static final String COMP_NAME="java:comp/env/ejb/AbstractSession"; public static final String JNDI_NAME="ejb/AbstractSession"; public de.awd.vertriebsportal.service.facade.test.interfaces.AbstractSession create() throws javax.ejb.CreateException,java.rmi.RemoteException; }But the interface MySessionHome not:
public interface MySessionHome extends de.awd.vertriebsportal.service.facade.test.interfaces.AbstractSessionHome { public static final String COMP_NAME="java:comp/env/ejb/MySession"; public static final String JNDI_NAME="ejb/MySession"; }We could reimplement the ejbCreate-Method in MySessionBean of course, but that would be no great solution.
We also tried to generate the superclass with the xDoclet wizard, so that the superclass obtains its own xdoclet tags, but it doesn`t work either.
Thanks
Marc -
AuthorPosts
