• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Table name for Container-managed Entity Bean

 
Victor Htet
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm a beginner for EJB. I'm reading Container-managed Entity Bean documents but I just found out that the deployment descriptor just list the mapping of Container-Managed Fields to DB fields but there is no description for the database table name. How would I specify the db table name in deployment descriptor?
Thanks you all.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know which Version/Vendor you are using but you associate the Table first and then Columns. I am quoting the example from WebLogic Docs:
(jdbc
tableName ejbAccounts
dbIsShared false
poolName demoPool
(attributeMap
; EJBean field Database column name
; -----------------------------------------
accountId id
balance bal
type type
); end attributeMap
 
Victor Htet
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using BEA's WebLogic. Your information is very helpful for me. Thanks.

Originally posted by skill123:
I don't know which Version/Vendor you are using but you associate the Table first and then Columns. I am quoting the example from WebLogic Docs:
(jdbc
tableName ejbAccounts
dbIsShared false
poolName demoPool
(attributeMap
; EJBean field Database column name
;

 
shahul hameed
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you elicit what to do with Jboss for the same issue !

Originally posted by skill123:
I don't know which Version/Vendor you are using but you associate the Table first and then Columns. I am quoting the example from WebLogic Docs:
(jdbc
tableName ejbAccounts
dbIsShared false
poolName demoPool
(attributeMap
; EJBean field Database column name
;

 
Madhu Juneja
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can make use of the wizard for deploying the beans. In that case you need not create a deployment descriptor xml file yourself and also it is easier with a wizard. Weblogic has a very user friendly wizard next to J2ee Server.

 
shahul hameed
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Madhu, Thanks.
You mean that I should the Wizard/tool in WebLogic to create the descriptors for the Entity Beans to deploy it in Jboss.
Also it implies that the table name goes in the descriptor.
Did I understand you correctly ?
Thanks for your help.

 
Madhu Juneja
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As mentioned in the earlier posts here, I was under the impression that you were using weblogic.
But using weblogic to create the xml file and then using this file in Jboss should also work. May be you need to compare both.
You were right table name does appear in the xml descriptor file.
Example :
<table-name>CLASS6</table-name>
 
Madhu Juneja
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The tags are \<\table-name\>\CLASS6\<\/table-name\>\
The xml tags are disappearing. If you clink on the reply icon of earlier mail, the tags are displayed.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic