Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can I choose BMP along with CM transaction (EJB newbie) ?  RSS feed

 
Fei Teng
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a EJB newbie question ---

1. Can I choose BMP for entity bean persistence and meanwhile for all the transaction I choose Container managed type ?

2. if I design a scenario as follows--- I have some stateless session beans and they talk to entity beans, and I want to use BMP for entity beans. I want to have some operations like "addRecord", "deleteRecord", where should I define and implement the details for them ? should I

a) define "addRecord" in session bean, and include the JDBC SQL in session bean too.

b) define "addRecord" in session bean, but include the JDBC SQL stuff in the entity bean.

c) define and implement "addRecord" entirely in entity bean, in session bean just define a "addRecord" that only calls entity bean's "addRecord" ?
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes You can only use BMP with entity beans but with only Container managed transaction. (c)is the option to go for.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!