Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB creates new table in database.........

 
Pras Tiwari
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I am developing small EJB CMP 2.0 application.
I have one table named "employeemaster" in my database & for dat table i ve created EJB named "EmpMasterBean" successfully. Now when i m deploying n running EJB, It creates a table named "EmpMasterBean" in my database, which is my bean's name. But I don't want hare to create new table, instead i want to insert data into already existing table "employeemaster" for which i ve created above bean.

How to do this???

Please help me.

Thanx in advance...
 
Shrinivas Mujumdar
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which AppServer you are using?
In CMP there will be one more Deploymwnt Descriptor e.g If its weblogic then, name of Deployment Descriptor is weblogic-cmp-rdbms-jar.xml,which specifies Table name & mapping info of cmp fields & db columns etc.
 
Pras Tiwari
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanx for trying on this.
I got my mistake. I m using JBOSS4.0.3 & I was missing <table-name> tag in my jbosscmp-jdbc.xml file. Now it working fine.
Thanx again for trying.

Prash
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic