• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

How to configure JPA suppourt for a Application

Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,

I am using MyEclipse as IDE .
I am trying to addd JPA Capabilities to the EJB Module .
( I want to use Container Managed EntityManager inside my SessionBeans (so JTA as my Transaction Suppourt )

Please Tell me what should be the name that should be mentioned under JNDI Data Source field name .
Please see the screen shot attached here .

Also tell me do i need to define this JNDI DataSource anywhere in my server ??(I am using weblogic as my server)

[Thumbnail for jndidatasource.jpeg]
Saloon Keeper
Posts: 24804
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't use IDE wizards for stuff like this. I manipulate the project files directly, so whatever advice I can give won't reflect MyEclipse (which I don't have installed), and won't even have a whole lot to do with Eclipse itself. But it will be JEE, which is what the ultimate goal is, IDE or not.

JPA is part of the EJB3 spec, so what you're really saying is that you want to get EJB3 running. You can run JPA without the full EJB3 (for example Spring/Hibernate/Tomcat), but EJB3 is JPA. EJB2 and earlier are not.

When the container supports EJB3, you can have it inject the persistence manager into your Session EJBs using JPA annotations. Most of the JNDI stuff goes undercover or disappears entirely in EJB3. Remoting was the norm under the original EJB spec, and you needed JNDI for that, but Remote beans are the exception in EJB3, so direct object references are usually sufficient.

In cases where you don't have the server providing direct EJB support, the persistence.xml file is normally where you configure your connection/entitymanagerfactory persistence information. I've spent so much time in places where they banned EJBs that I'm not quite sure what, if any role the persistence.xml performs in a true EJB container, although with luck I'll know more later this week when I attempt to port a project.
    Bookmark Topic Watch Topic
  • New Topic