MyEclipse - XDoclet problem

Discussion in 'Java' started by Kaspar Minosiants, Dec 8, 2003.

  1. Hi
    I'm trying to create a simple EJB by the help of myeclipse
    1. i've created EJB class
    2. selected myeclipse - XDoclet standart EJB
    and after running myeclipse - XDoclet only 'home' interface has been
    generated
    could anybody explain why 'object' interface hasn't been generated
    I use
    Eclipce Version: 3.0.0 Build id: 200310101454
    MyEclipse Version: 3.6.4


    code:
    ----------------------------------------------------------------------------
    --

    package hello;import java.rmi.RemoteException;import
    javax.ejb.CreateException;import javax.ejb.EJBException;import
    javax.ejb.SessionBean;import javax.ejb.SessionContext;/** * XDoclet-based
    stateless session bean. The class must be declared * public, according to
    the EJB specification. * * To generate code: * * * a.. Add Standard EJB
    module to XDoclet project properties * b.. Customize XDoclet configuration
    * c.. Run XDoclet * * * Please see the included XDoclet Overview * and
    the XDoclet Reference in the help system for details * * @ejb.bean name =
    "HelloWorld" * type = "Stateless" * display-name =
    "HelloWorld" * description = "HelloWorld EJB" *
    view-type = "remote" * jndi-name = "ejb/HelloWorldHome" */public
    class HelloWorld implements SessionBean { /** The SessionContext */ private
    SessionContext context; /** * An ejbCreate method as required by the EJB
    specification. * * The container calls the instance's ejbCreate method
    whose * signature matches the signature of the create method invoked *
    by the client. The input parameters sent from the client are passed to *
    the ejbCreate method. Each session bean class must have at * least one
    ejbCreate method. The number and signatures * of a session bean's create
    methods are specific to each * session bean class. * * @throws
    CreateException Thrown if the instance could not perform * the function
    requested by the container because of an system-level error. * *
    @ejb.create-method */ public void ejbCreate() throws CreateException { }
    /** * The ejbActivate() method as required by the EJB specification. * *
    The activate method is called when the instance is activated from its *
    passive" state. The instance should acquire any resource that it has *
    released earlier in the ejbPassivate() method. * * This method is called
    with no transaction context. * * @throws EJBException Thrown if the
    instance could not perform * the function requested by the container
    because of an system-level error. */ public void ejbActivate() throws
    EJBException { } /** * The ejbPassivate() method as required by the EJB
    specification. * * The activate method is called when the instance is
    activated from * its "passive" state. The instance should acquire any
    resource that * it has released earlier in the ejbActivate() method. *
    * This method is called with no transaction context. * * @throws
    EJBException Thrown if the instance could not perform * the function
    requested by the container because of an system-level error. */ public void
    ejbPassivate() throws EJBException { } /** * The ejbRemove() method as
    required by the EJB specification. * * A container invokes this method
    before it ends the life of the * session object. This happens as a result
    of a client's invoking * a remove operation, or when a container decides
    to terminate the * session object after a timeout. * * This method
    is called with no transaction context. * * @throws EJBException Thrown
    if the instance could not perform * the function requested by the
    container because of an system-level error. */ public void ejbRemove()
    throws EJBException { } /** * Set the associated session context. The
    container calls this method * after the instance creation. * * The
    enterprise bean instance should store the reference to the context *
    object in an instance variable. * * This method is called with no
    transaction context. * * @throws EJBException Thrown if the instance
    could not perform * the function requested by the container because of an
    system-level error. */ public void setSessionContext(SessionContext
    newContext) throws EJBException { context = newContext; } /** * An
    example business method * * @ejb.interface-method view-type = "remote" *
    * @throws EJBException Thrown if the instance could not perform * the
    function requested by the container because of an system-level error. */
    public void m1() throws EJBException { // rename and start putting your
    business logic here } /** * An example business method * *
    @ejb.interface-method view-type = "remote" * * @throws EJBException
    Thrown if the instance could not perform * the function requested by the
    container because of an system-level error. */ public void m2() throws
    EJBException { // rename and start putting your business logic here }}

    ----------------------------------------------------------------------------
    --

    Thanks a lot !
     
    Kaspar Minosiants, Dec 8, 2003
    #1
    1. Advertising

  2. Re: MyEclipse - XDoclet problem HelloWorld.java src

    package hello;

    import java.rmi.RemoteException;

    import javax.ejb.CreateException;
    import javax.ejb.EJBException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;

    /**
    * XDoclet-based stateless session bean. The class must be declared
    * public, according to the EJB specification.

    *
    * To generate code:
    *

    *

    * * Add Standard EJB module to XDoclet project properties
    *
    * Customize XDoclet configuration
    *
    * Run XDoclet
    *


    *

    * Please see the included XDoclet Overview
    * and the XDoclet Reference in the help system for details
    *
    * @ejb.bean name = "HelloWorld"
    * type = "Stateless"
    * display-name = "HelloWorld"
    * description = "HelloWorld EJB"
    * view-type = "remote"
    * jndi-name = "ejb/HelloWorldHome"
    */
    public class HelloWorld implements SessionBean {

    /** The SessionContext */
    private SessionContext context;

    /**
    * An ejbCreate method as required by the EJB specification.

    *
    * The container calls the instance's ejbCreate method whose
    * signature matches the signature of the create method invoked
    * by the client. The input parameters sent from the client are passed to
    * the ejbCreate method. Each session bean class must have at
    * least one ejbCreate method. The number and signatures
    * of a session bean's create methods are specific to each
    * session bean class.
    *
    * @throws CreateException Thrown if the instance could not perform
    * the function requested by the container because of an system-level error.
    *
    * @ejb.create-method
    */
    public void ejbCreate() throws CreateException {
    }

    /**
    * The ejbActivate() method as required by the EJB specification.

    *
    * The activate method is called when the instance is activated from its
    * passive" state. The instance should acquire any resource that it has
    * released earlier in the ejbPassivate() method.

    *
    * This method is called with no transaction context.
    *
    * @throws EJBException Thrown if the instance could not perform
    * the function requested by the container because of an system-level error.
    */
    public void ejbActivate() throws EJBException {
    }

    /**
    * The ejbPassivate() method as required by the EJB specification.

    *
    * The activate method is called when the instance is activated from
    * its "passive" state. The instance should acquire any resource that
    * it has released earlier in the ejbActivate() method.

    *
    * This method is called with no transaction context.
    *
    * @throws EJBException Thrown if the instance could not perform
    * the function requested by the container because of an system-level error.
    */
    public void ejbPassivate() throws EJBException {
    }

    /**
    * The ejbRemove() method as required by the EJB specification.

    *
    * A container invokes this method before it ends the life of the
    * session object. This happens as a result of a client's invoking
    * a remove operation, or when a container decides to terminate the
    * session object after a timeout.

    *
    * This method is called with no transaction context.
    *
    * @throws EJBException Thrown if the instance could not perform
    * the function requested by the container because of an system-level error.
    */
    public void ejbRemove() throws EJBException {
    }

    /**
    * Set the associated session context. The container calls this method
    * after the instance creation.

    *
    * The enterprise bean instance should store the reference to the context
    * object in an instance variable.

    *
    * This method is called with no transaction context.
    *
    * @throws EJBException Thrown if the instance could not perform
    * the function requested by the container because of an system-level error.
    */
    public void setSessionContext(SessionContext newContext)
    throws EJBException {
    context = newContext;
    }

    /**
    * An example business method
    *
    * @ejb.interface-method view-type = "remote"
    *
    * @throws EJBException Thrown if the instance could not perform
    * the function requested by the container because of an system-level error.
    */
    public void m1() throws EJBException {
    // rename and start putting your business logic here
    }
    /**
    * An example business method
    *
    * @ejb.interface-method view-type = "remote"
    *
    * @throws EJBException Thrown if the instance could not perform
    * the function requested by the container because of an system-level error.
    */
    public void m2() throws EJBException {
    // rename and start putting your business logic here
    }
    }
     
    Kaspar Minosiants, Dec 8, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. MyEclipse Support
    Replies:
    0
    Views:
    435
    MyEclipse Support
    Jul 23, 2003
  2. MyEclipse J2EE Solutions
    Replies:
    0
    Views:
    436
    MyEclipse J2EE Solutions
    Oct 27, 2003
  3. jacksu
    Replies:
    1
    Views:
    805
    Riyad
    Nov 30, 2004
  4. Greg
    Replies:
    0
    Views:
    647
  5. tenxian
    Replies:
    0
    Views:
    630
    tenxian
    Apr 11, 2008
Loading...

Share This Page