Discussions

News: EJB 3 Tutorials

  1. EJB 3 Tutorials (6 messages)

    More real EJB 3 information is coming out. The Resin folks have started to put out EJB 3 Tutorials, which are interesting to read. The current tutorials discuss a simple local stateless session bean, and various CMP entity use cases.

    Scott Ferguson's thoughts on CMP and TX
    One thing I hope they fix in later specs is the requirement to use CMP in transactions. For display, i.e. read-only, there's no need to run inside a transaction. The overhead of forcing a session bean seems a bit unwieldy. So, as a possible API to work around this, I've added a begin()/end() pattern to the EntityManager:
    ResinEntityManager _entityManager;

    _entityManager.begin()
    try {
      ...
    } finally {
      _entityManager.end();
    }

    It's expected that the begin/end pattern would either live in a servlet filter or could be an AOP interception. Aside from the begin/end, the EntityManager works exactly as the EJB 3.0 spec. For now, the tutorials use explicit begin/end in the servlet examples, which simplifies the tutorials tremendously.
    View the EJB 3 Tutorials.

    Threaded Messages (6)

  2. Orion support - EJB 3 Tutorials[ Go to top ]

    What parts of EJB3.0 spec is supported by Resin?
  3. Resin support - EJB 3 Tutorials[ Go to top ]

    The support is only in the "snapshot" versions of Resin, which is basically alpha code. i.e. any particular snapshot may be totally broken.

    Currently, it supports:

    @Entity, @Stateless, @TransactionAttribute, @Table, @Id, @Basic, @Column, @ManyToOne, @OneToMany, @ManyToMany, @JoinColumn, @AssociationTable.

    The big missing things are inheritance, secondary tables and lazy loading.

    From EntityManager, the find, createQuery, create, remove, and flush have been added. Missing are refresh, evict, contains, and createNamedQuery.

    In other words, it's nowhere near complete, but it should be enough for people who want to check out the current EJB 3.0 draft to get their feet wet (as long as you can deal with the likelihood of annoying bugs.)

    Also, rereading the draft, it may already partially address the concerns I added, since you can call the query methods of EntityManager outside a transaction context. I still don't understand how lazy loading is supposed to work without some kind of persistence context marker, so I still think the begin/end is needed at least as a temporary hack.
  4. @AssociationTable[ Go to top ]

    Hi, is the anotation @AssotiationTable supported by the waiter of déloiement JBoss 4.0.4?!!
  5. Hi,
    can any body help me in EJB to access the disconnected database
    urgently needed
    thanks
  6. JEE 5 and EJB 3.0 Tutorial[ Go to top ]

    Hi, This very useful JEE 5.0 and EJB 3.0 Tutorial. Topics Covered in the Tutorial: * Introduction to the JEE Technologies * JEE 5 APIs * Installing and configuring Sun Java System Application Server Platform Edition * Deploy Application on Sun Java System Application Server Platform Edition * Understanding EJB 3.0 And many more.. Read at: http://www.roseindia.net/java/jee5/index.shtml Thanks Deepak Kumar
  7. Re: JEE 5 and EJB 3.0 Tutorial[ Go to top ]

    This very useful JEE 5.0 and EJB 3.0 Tutorial. Topics Covered in the Tutorial: * Introduction to the JEE Technologies * JEE 5 APIs * Installing and configuring Sun Java System Application >> Server Platform Edition * Deploy Application on Sun Java System Application Server >> Platform Edition * Understanding EJB 3.0
    This 'tutorial' seems negligibly useful and choc-full of ads, possibly delivering repurposed content from elsewhere. Frankly: annoying.