-
1. Re: Value Objects and EJB deployment descriptors
adrian.brock Aug 7, 2003 6:24 AM (in response to bbd66)I'm guessing from the class name that you've tried
to define the getter in the local home?
It is unclear what you are asking in your second question.
Local interfaces cannot be used outside the same VM where
load balancing would be used.
Regards,
Adrian -
2. Re: Value Objects and EJB deployment descriptors
bbd66 Aug 7, 2003 8:09 AM (in response to bbd66)Yes I have tried to declare it in the local home...is that incorrect?
About the second question: I am debating whether or not to use Value Objects to aggregate all the field values from the entity into a value object. I see no point in using the Value Objects if all my calls from the session bean layer (facade) will be local and I can create a value object in the session bean layer. In a clustered environment, will the session bean layer (facade) still be making local calls to the entity beans?
Thanks,
Dave -
3. Re: Value Objects and EJB deployment descriptors
adrian.brock Aug 7, 2003 1:25 PM (in response to bbd66)The value object should be on the remote/local interface.
It is more efficient to contruct the value object at the
entity level. Consider an entity with 20 fields.
That would require 20 getXXX invocations but getValue()
only requires one.
The session bean should be using local entity beans
so load balancing/failover doesn't happen at this level.
It happens at the session level.
Regards,
Adrian -
4. Re: Value Objects and EJB deployment descriptors
bbd66 Aug 7, 2003 3:49 PM (in response to bbd66)Adrian,
I have tried to add a value object creation method but I was getting Deployment problems:
org.jboss.deployment.DeploymentException: No abstract accessors for field named 'stateSelectionID' found in en
tity class com.tpg.main.framework.engine.consumer.mdb.GroupStatesBean
I eliminated the abstract methods and assigned the values from the query to the variables of the class as in the attached file. I cannot have them being abstract since there must be implementation for teh value object code.
I am in a bit of a cunnundrum here,
Thanks for any help,
Dave -
5. Re: Value Objects and EJB deployment descriptors
adrian.brock Aug 8, 2003 12:51 PM (in response to bbd66)Is this CMP1.1 or CMP2
The persistent fields should have abstract gets and sets
in CMP2.
Regards,
Adrian -
6. Re: Value Objects and EJB deployment descriptors
bbd66 Aug 8, 2003 1:41 PM (in response to bbd66)I am using CMP 2.0.
Does that mean that I can't have a Value Object in my entity bean class cause I can't define the implementation of the getData() method which returns the value object if it's supposed to be abstract? Is there a way around this?
Thanks,
Dave