EJB3 with hand-coded ORM in JDBC



Hi all,
I am writing a Stateless session bean in with an EJB 3.0 container
(using JBoss 4.2 right now, and possibly Glassfish later). This bean
is going to provide reading/writing from the DB supplemented by some
business logic (using hand-written JDBC DAO's for my objects). The
EJB3 annotations for everything non-persistence are great and they
work for me. However, my underlying data model is more like a EAV (key-
value pair-ish) type of stuff which does not at all fit into the
object-relational mapping provided by the EntityManager. So, my
question is this, is it possibly for me to use EJB3 (so I get all the
non-persistence annotations), but hand-code my own persistence. I know
I can just open a JDBC connection myself from the method on the bean,
but I'd still need to have the txns be container managed. Sorta like
pre-EJB3 for persistence, but EJB3 for everything non-persistence.
The problem is that every book/manual/article I've read on EJB 3.0 so
far uses the persistence annotations and they use hibernate (or some
other abstraction layer). I just need to be able do my own with JDBC.
Please please tell me it's possible.
Any help would be greatly appreciated.
Thanks,

Clive

.



Relevant Pages

  • Re: Which bean ? ....
    ... The bean needs to stay resident because the local data structure ... couldn't implement it using an entity bean, but it doesn't have the feel ... The EJB container has complete authority to passivate ... In a distributed EJB container I ...
    (comp.lang.java.programmer)
  • Re: Bean or Container Managed Persistence
    ... > is bean or container managed persistence. ... it depends if you are at EJB 1.x or at EJB 2.x. ...
    (comp.lang.java.programmer)
  • Re: EnterpriseBean and finalize()
    ... I'm trying to learn EJB and picked up a copy of the book "SCBCD Exam ... or b) why finalizing a bean would be ... interfering with the responsibilities of the container. ... 'finalize' methods, then it would be invoked at some potentially very ...
    (comp.lang.java.programmer)
  • EJB3 with hand-coded ORM in JDBC
    ... I am writing a Stateless session bean in with an EJB 3.0 container ... pre-EJB3 for persistence, ... The problem is that every book/manual/article I've read on EJB 3.0 so ...
    (comp.lang.java.programmer)
  • Newbie question about EJB-CMP: is it worth it when using multiple containers?
    ... I'm playing around with container managed persistence, ... databases. ... "The Deployer, using the Container Provider s tools, determines how the ... isn't it better to write just some normal SQL once and use bean managed ...
    (comp.lang.java.programmer)