• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Having both Remote & Local Component interfaces to a Bean?

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would appreciate if some one answers the following:-

1) Is it possible to have both the remote & local component interfaces to a Bean( EB/SFSB/SLSB)in the same ejb-jar? If so how to define them in DD.

2) Can CMP filds of EB be primitive?

3) Should EB in EJB 2.0 be CMP & CMT only?

Thanks
Bhanu
 
Ranch Hand
Posts: 41
Java ME Spring Objective C
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bhanu,

I'll try to answer all your question.

1) Is it possible to have both the remote & local component interfaces
to a Bean( EB/SFSB/SLSB)in the same ejb-jar? If so how to define them
in DD.


Yes, you can. Here's an example.




2) Can CMP fields of EB be primitive?


Yes, this is from the EJB 2.0 specs.

The Bean Provider must ensure that the Java types assigned to the
cmp-fields are restricted to the following: Java primitive types and Java
serializable types.



3) Should EB in EJB 2.0 be CMP & CMT only?

No, an EB can be CMP or BMT (Bean-Managed Transaction)


When designing an enterprise bean, the Bean Provider must decide whether
the enterprise bean will demarcate transactions programmatically in the
business methods (bean-managed transaction demarcation), or whether the
transaction demarcation is to be performed by the Container based on the
transaction attributes in the deployment descriptor (container-managed
transaction demarcation).


Hope this will help you

Sylvain
SCJP - SCWCD
 
Bhanu
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Sylvain!!

But I see the following in the EJB 2.0 Spec, which is hinting that Entity Beans can not be BMT. ( Pg:179 10.5.4)

The getUserTransaction method returns the javax.transaction.UserTransaction
interface. Entity bean instances must not call this method.


[ March 03, 2006: Message edited by: Bhanu P Jasthi ]
[ March 03, 2006: Message edited by: Bhanu P Jasthi ]
 
Sylvain Bouchard
Ranch Hand
Posts: 41
Java ME Spring Objective C
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bhanu,

You right, I've read the question too quickly.
I miss the EB part of your question.

This thread might clarify your doubts even further.

https://coderanch.com/t/317305/EJB-JEE/java/why-entity-bean-cannot-manage

Sylvain
SCJP - SCWCD
 
yeah, but ... what would PIE do? Especially concerning this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic