Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > EJB3 with hand-coded ORM in JDBC

Reply
Thread Tools

EJB3 with hand-coded ORM in JDBC

 
 
anondude123@gmail.com
Guest
Posts: n/a
 
      06-15-2007
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

 
Reply With Quote
 
 
 
 
Lew
Guest
Posts: n/a
 
      06-15-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> 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,


Please do not multi-post. I have consolidated the multi-posts that I found so
that respondents can follow an unfragmented thread.

--
Lew
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ORM or JDBC? carmelo Java 94 04-02-2011 02:25 PM
Re: ORM or JDBC? Alessio Stalla Java 20 03-27-2011 03:24 AM
Re: ORM or JDBC? Alessio Stalla Java 6 03-25-2011 08:00 PM
Re: ORM or JDBC? Alessio Stalla Java 3 03-25-2011 05:21 PM
Re: ORM or JDBC? Alessio Stalla Java 5 03-24-2011 01:00 AM



Advertisments