Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6226827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:06:13+00:00 2026-05-24T09:06:13+00:00

I apologize if this is an obvious question, but I’m going through the Java

  • 0

I apologize if this is an obvious question, but I’m going through the Java EE 6 tutorial while reading a couple books and it’s getting hard to correlate all of the information.

I’m doing a little comparison between JDO and JPA. I understand that with JPA and an application server, I can quite easily say something like:

@Stateless
public class MyEJB {

  @PersistenceContext
  private EntityManager em;

  // methods that use the JPA entity manager...
}

Then, within my own methods, I can use em to get at a JPA EntityManager. Whatever methods I write will (by default) automatically create or join up with an existing transaction.

I’d like to have this much fun with JDO. I suspect the right answer is to use CDI. I’m not sure what that would look like though, perhaps this?

@Stateless
public class MyEJB {

  @Resource
  private PersistenceManager em;

  // methods that use the JDO persistence manager...
}

But this guesswork leaves me with more questions than answers.

  1. How do I tell Glassfish or whatever my Java EE 6 application server turns out to be, how to make the PersistenceManagerFactory and how to use it to generate PersistenceManagers for me?
  2. Do I have to do anything special to achieve JTA? I’d like to be using container managed transactions if possible.
  3. Can I set this up to use JNDI to find my JDBC connection?
  4. Are there magical files that need to exist to trigger the behavior I want? (I’m looking at you, empty persistence.xml)

Apart from imposing a dependency on JDO and probably DataNucleus directly I’d rather keep this as Java EE 6 as possible, without involving Spring or other third party libraries, but I’d take a third party library over nothing.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T09:06:14+00:00Added an answer on May 24, 2026 at 9:06 am

    http://www.datanucleus.org/products/accessplatform_3_0/jdo/j2ee.html
    covers many aspects of Java EE, and gives examples for several Java EE servers including JBoss 7 (the latest spec). It is a contributory effort since nobody uses all such servers; if you have details to add then post them on the DataNucleus forum and they can be included

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I apologize for the subjectiveness of this question, but I am a little stuck
I'm very new to Silverlight so I apologise if this question is obvious but
I'm new to SSRS, so I apologize if this question is too simple: I
I apologize in advance if this question seems remedial. Which would be considered more
Let me apologize in advance for the simplicity of this question (I heard Jeff's
First and foremost, I apologize for any vagueness in this question. At this point,
I may just be missing something obvious here, so I apologize if this is
First of all, I apologize if this is a stupid question, I'm a dead
If this is a Google Is Your Friend question, I apologize in advance. I've
This seems like such a basic question, so I apologize if it's already been

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.