Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Dependent value classes  RSS feed

Murali Mohan Atmakuri
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJB 2.0 specified Dependent value classes for Entity bean. Could anyone explain exactly what it means and how different it is from Value objects.
The spec says:

A dependent class is a contrete class.A dependent value class may be a legacy class that the bean provider wishes to use internally within an entity bean with CMP, 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 a value of a cmr-field. The internal structure of a dependent value class is not described in EJB deployment descriptor.

One other confusing aspect is that since a cmp field Java types are wrappers of primitive types , so does this mean that Dependent value classes should only be wrapper classes.

Please explain
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!