Hi,

I am converting a "regular" Java class into a Stateless Session EJB.
This class is a controller object in an MVC architecture.
(UserAccountController)
I invoke a method with a parameter (fetchUserAccount(viewBean))  and expect
the method to fill various fields of the parameter object.
This works fine in the regular class but does not seem to work as an EJB.
The changes made during my fetch command are not returned to the caller.

It appears that a copy of the object is actually being used once I go
through the remote interface stubs and ties.
Changes are made to the copy inside the EJB. But when I return, I'm left
with the original data that I passed in.


This is how I understand it:
My fetch command is implemented in UserAccountControllerBean.  The method
has been promoted to the Remote Interface for the bean
(UserAccountController).  When I invoke the fetchUserAccount() method, it
actually goes through the following steps:

_UserAccountController_Stub.fetchUserAccount()   calls
_UserAccountController_BaseStub.fetchUserAccount()   which in turn calls
_EJSRemoteUserAccountController_Tie._invoke()   which calls
_EJSRemotreUserAccountController.fetchUserAccount() which finally invokes my
code in
UserAccountControllerBean.fetchUserAccount()


The _EJSRemoteUserAccountController_Tie._invoke() method appears to be where
the parameter is "copied" via
"in.read_value(UserAccountView.class)".

Is this what is actually happening?
Does my parameter essentially become a "passed by value" item somewhere
along the way?

I suppose, if this is true, I can try various workarounds.

Any comments/clarity is appreciated.

Thanks,
Dan

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to