aspose file tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Q about Entity Bean DD Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Reply Bookmark "Q about Entity Bean DD" Watch "Q about Entity Bean DD" New topic
Author

Q about Entity Bean DD

Deep Chand
Ranch Hand

Joined: Dec 17, 2002
Posts: 133
See the DD section for entity bean at the end (from MZ Study Notes):

a) Does this mean that either local, local-home OR home, remote MUST be specified? OR you can get away without speciying them at all.

b) MZ study notes say:
" an optional specification of the entity bean�s abstract schema name (CMP only), an optional list of container-managed fields (CMP only), an optional specification of the primary key field (CMP only)"

Does this mean that in CMP also they are optional OR if the bean is CMP then they MUST be specified?

<!ELEMENT entity (description?, display-name?, small-icon?,
large-icon?, ejb-name, home?, remote?, local-home?,
local?, ejb-class, persistence-type, prim-key-class,
reentrant, cmp-version?, abstract-schema-name?,
cmp-field*, primkey-field?, env-entry*, ejb-ref*,
ejb-local-ref*, security-role-ref*, security-identity?,
resource-ref*, resource-env-ref*, query*)>
Paul Codillo
Ranch Hand

Joined: Aug 21, 2002
Posts: 38
a) Does this mean that either local, local-home OR home, remote MUST be specified? OR you can get away without speciying them at all.
- MDBs do not have client views, so component and home interfaces do not make sense to them.

b) MZ study notes say:
" an optional specification of the entity bean�s abstract schema name (CMP only), an optional list of container-managed fields (CMP only), an optional specification of the primary key field (CMP only)"
Does this mean that in CMP also they are optional OR if the bean is CMP then they MUST be specified?
- This means they have to be filled in for CMP entity beans.
[ March 22, 2005: Message edited by: paul.com ]

paul.com<br />SCJP, SCWCD, SCBCD, SCEA
Deep Chand
Ranch Hand

Joined: Dec 17, 2002
Posts: 133
No but every where it's written that the 5 mandatory elements for entity beans are:

ejb name, ejb class, prim key class, reentrant and persistence type.

What about remote, home interfaces etc? Don't they need to be be mandatory?

Thanks
Deep
Stefan Guilhen
Ranch Hand

Joined: Jul 31, 2004
Posts: 61
Suppose that remote and home were mandatory. What would this imply? That the bean provider would need to define the remote component and home interfaces of the entity bean even when it does not have a remote view! The same applies to local and local-home: if they were mandatory the bean provider would need to define them for an entity even when it does not define a local view.
The spec says that the entity bean must define at least one set of interfaces (remote or local or both) and the container will check this at deployment time. The DTD just don't make them mandatory because that would be too restricting.

Regards,
Stefan
[ March 22, 2005: Message edited by: Stefan Guilhen ]

SCJP 1.4, SCBCD 1.3<br />IBM 141, 484, 486
Deep Chand
Ranch Hand

Joined: Dec 17, 2002
Posts: 133
Thanks. Now it makes sense to me.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Q about Entity Bean DD
 
Similar Threads
Verify failure Deployment Exception
Entity EJB & env-entry problem with WebLogic7
Composite Primary Key
About BMT
EJB Notes I prepared during my preparation for SCBCD