• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Liutauras Vilda
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Piet Souris

Entitybean

 
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi guys

I guess this is simple

For entity beans
Is Container managed persistance anyway related to Container Manged Transactions.
Also, Is Bean managed persistance anyway related to Bean Managed
transactions.

or are they completely different but work in the same way.

any responces appreciated
thanks
J
 
Ranch Hand
Posts: 259
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
An entity bean(with BMP or CMP) cannot have bean-managed transactions.

Now your questions.

Is Container managed persistance anyway related to Container Managed Transactions.
Yes

Also, Is Bean managed persistance anyway related to Bean Managed
transactions.

No
 
jay roy
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks karthi.

>>>An entity bean(with BMP or CMP) cannot have bean-managed transactions.
are you 100% sure about this?


I feel
CMP with BMT is a bad choice.
but BMP with BMT is possible.
 
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by jay roy:
CMP with BMT is a bad choice.
but BMP with BMT is possible.


For entity beans you can choose either CMP or BMP as your persistence mechanism. Regarding transactions, for entity beans you should only use CMT irrespective of your persitence mechanism. For session beans, you will have the choice to choose from CMT or BMT. BMT should not be used for entity beans. You must use CMT even if your entity bean uses BMP. BMT can only be used for session beans. Ranchers, please correct me if I am wrong.
 
jay roy
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks durgaprasad for the response.

when you say

>>>BMT should not be used for entity beans

Is there any specific practical reason why it should not be used?
Did you read it in any text book or a website or do you feel its a j2ee best practise to follow.

thanks,
J
 
Durgaprasad Guduguntla
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by jay roy:

Is there any specific practical reason why it should not be used?
Did you read it in any text book or a website or do you feel its a j2ee best practise to follow.



The EJB specification 2.1 states this in article 17.6.1. You can download this here.

Note that only Session and Message-driven beans can be used with bean-managed transaction demarcation.A Bean Provider is not allowed to provide an Entity bean with bean-managed transaction demarcation.



Further you can also check out these links for more information:

http://java.boot.by/bcd-guide/ch11.html#c11s1

http://www.whizlabs.com/scbcd/scbcd-notes.html
 
jay roy
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks durgaprasad.

if you get a chance, can you please take a look at this thread.

https://coderanch.com/t/155355/java-Architect-SCEA/certification/ejbhome


thanks
J
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take a look at

http://www.novell.com/documentation/extendas35/docs/help/books/pgEJBSesBean.html


it talks about CMT, BMT for session and entity bean. It's very useful.
 
reply
    Bookmark Topic Watch Topic
  • New Topic