• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

More Questions on Entity Bean  RSS feed

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a) What is a dependent value class? The MZ study guide says that:

The following are the requirements for a dependent value class:
The class MUST be defined as public and MUST NOT be abstract.The class MUST be SERIALIZABLE.

b) About the ejbCreate method syntax, MZ Study guide says:
"The throws clause MUST define the javax.ejb.CreateException.The throws clause may define arbitrary application specific exceptions."

But the example in HF book (page 316) doesn't throw createexception. Is that by mistake?

Please reply.

Thanks
Deep
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Deep Chand:
b) About the ejbCreate method syntax, MZ Study guide says:
"The throws clause MUST define the javax.ejb.CreateException.The throws clause may define arbitrary application specific exceptions."

But the example in HF book (page 316) doesn't throw createexception. Is that by mistake?

Please reply.

Thanks
Deep[/QB]



The throws clause in the ejbCreate() of the bean need not throw CreateException as long as it does not throw that exception. But the throws clause of the create() method in the Home Interface needs to declare CreateException.
I am not sure about MZ notes coz i didnt go through it... but i am kinda sure that the HF-EJB thing is not be mistake.
 
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

This is what the specification has to say on the dependent value class:

10.3.3 Dependent Value Classes
A dependent value class is a concrete class that is the value of a cmp-field. A dependent value class may be a class that the Bean Provider wishes to use internally within an entity bean with container-managed persistence, and/or it may be a class that the Bean Provider chooses to expose through the remote (or local) interface of the entity bean.
A dependent value class can be the value of a cmp-field; it cannot be the value of a cmr-field. The get accessor method for a cmp-field that corresponds to a dependent value class returns a copy of the dependent value class instance. The assignment of a dependent value class value to a cmp-field using the set accessor method causes the value to be copied to the target cmp-field.
A dependent value class must be serializable. The internal structure of a dependent value class is not described in the EJB deployment descriptor.

Thanks

-- Ravi
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!