File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes ejb database mapping Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "ejb database mapping" Watch "ejb database mapping" New topic
Author

ejb database mapping

Patt Rikk
Greenhorn

Joined: Jan 29, 2007
Posts: 6
In EJB, where is the mapping of database table and entity beans done? I am using Jboss, and from what I have read, the mapping should be somewhere in jbosscmp-jdbc.xml. But I dont have that file in my project.

Actually I have a project in which I have to make some enhancements, and I have deployed the code in my local machine. And surprisingly, without the required mapping file, it is able to do all the database related operations. Is there any other file or any other way in which we can mention it? OR maybe I am looking at the wrong place.
Sumit Malik
Ranch Hand

Joined: Jan 05, 2007
Posts: 84
Hey Patt Rick can you let me know which ejb version you are playing with ???

If you are using EJB3.0 then with the help of annotations you are defining your mapping of Entity beans with tables...

Cheers !!!
Sumit Malik


If at first you don't succeed, don't try skydiving
Patt Rikk
Greenhorn

Joined: Jan 29, 2007
Posts: 6
Its 1.1 and the database is Oracle 9i
Sumit Malik
Ranch Hand

Joined: Jan 05, 2007
Posts: 84
Hey Patt Rick do check all files in META-INF folder where you can provide you mapping file of entity beans(fields) with database..

I hope this link would be bit useful for you....

Cheers !!!
Sumit Malik
Patt Rikk
Greenhorn

Joined: Jan 29, 2007
Posts: 6
I have only 2 files in my META-INF folder.
ejb-jar.xml which defines all the ejbs used and jboss.xml which maps the ejb with the jndi name.
Nowhere do I find a mention of the database mapping with the Entity Beans.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ejb database mapping