Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ejb database mapping

 
Patt Rikk
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Patt Rikk
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its 1.1 and the database is Oracle 9i
 
Sumit Malik
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic