facebook

An EJB Tutorial

  1. MyEclipse Archived
  2.  > 
  3. Documentation
Viewing 10 posts - 16 through 25 (of 25 total)
  • Author
    Posts
  • #209885 Reply

    Scott Anderson
    Participant

    Murtuza,

    I believe the error is just as it states. You’re trying to define a container-managed entity bean and you’re not specifying the correct return type on the ejbCreate method. Perhaps you meant to define the EJB as a Stateless Session Bean instead?

    #209908 Reply

    Murtuza
    Member

    Thanks Scott, Actuall I figured out the problem. The problem was i copied and pasted the code from tutorial

    public abstract class SimpleBean implements EntityBean {
    * @ejb.bean name = “SimpleBean”
    * type = “CMP”
    * cmp-version = “2.x”
    * display-name = “SimpleBean”
    * description = “SimpleBean EJB”
    * view-type = “both”
    * jndi-name = “ejb/SimpleBeanHome”
    * local-jndi-name = “ejb/SimpleBeanLocalHome”
    * primkey-field = “id”
    * @ejb.persistence table-name = “tsimplebean”
    * @jboss.persistence table-name = “tsimplebean”
    * @ejb:util
    * generate=”physical”

    But there was already a xdoclet tags before the class declaration, which did not have any primary key information. The “Run XDoclet” was probably looking at that bit of xdoclet to generate other classes.

    I was successfuly able to develop, deploy and test this simple bean. Can you tell me where i can find advance tutorial (where development of more than one Entity Bean with CRM and Session Facade are demonstrated)

    Thanks
    Murtuza

    #209910 Reply

    Riyad Kalla
    Member

    Murtuza, thanks for closing the loop with us, glad it is working.

    #209915 Reply

    Murtuza
    Member

    Can you tell me where i can find advance tutorial (where development of more than one Entity Bean with CRM and Session Facade are demonstrated)

    Thanks
    Murtuza

    #209916 Reply

    Riyad Kalla
    Member

    Hmm honestly I can’t. Maybe you can search online for some JBoss tutorials or even check their page? I’ve not gotten into EJBs, sorry.

    Also Scott is free to reply to this thread later, even though I closed it. So if he knows, he can post a link or two for you.

    #210409 Reply

    LiLaLuna
    Member

    You should post your source or place it somewhere on the web.
    Problem normally occurs when the primaryKey specified by xdoclet-tags has not the same type as the return type. May be you missed a xdoclet tag.

    Sebastian

    #211943 Reply

    gzhuye
    Member

    I’m also working on EJB using the same env(Myeclipse,Jboss,mysql), any plugin components with MyEclipse for the definition of relationships between entity beans with container-managed persistence?

    I studied Sun J2EE 1.3 Tutorial, in Chapter: “Container-Managed Persistence Examples”, it has IDE tool to define the relationships between entity beans with container-managed persistence.(http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/CMP4.html)

    I can’t find such IDE with JBoss, is it better that MyEclipse has a plugin component with this kind of IDE Tool for EJB development?

    Best regards,

    Paul

    #216581 Reply

    LiLaLuna
    Member

    I added a second tutorial including a session and an entity EJB. the session bean is the fascade providing business methods.
    Data is exchanged with a value object.

    I provided the sources, so I hope that it is a complete example.


    session bean fascade to entity bean, using myeclipse, jboss and postgresql

    Regards Sebastian

    #216585 Reply

    Riyad Kalla
    Member

    Sebastian,
    Your tutorials look great, thank you for providing this resource for all the users.

    #277367 Reply

    cquezel
    Member

    This message has not been recovered.

Viewing 10 posts - 16 through 25 (of 25 total)
Reply To: An EJB Tutorial

You must be logged in to post in the forum log in