> Since this bean looks similar to an ActionForm, and we hope to use
> ActionForms for data validation, and I don't want to have to move data
> between similar beans, I decided that my bean could extend ActionForm.
> When
> I do this and invoke the getBean() method, I get a CORBA MARSHAL
exception
> -
> "Unable to read value from underlying bridge: minor code: 1398079699".

Consider using a ValueObject rather than an ActionForm to pass data
between the presentation layer and the business logic layer.  Having
your EJB implementation tied so closely to struts is probably not what
you want.  

If your action form is called PersonForm, create a ValueObject called
PersonVO and a methods in PersonForm called setPersonVO and getPersonVO.
It's a little more work up front, but the long term benefit is worth it
IMHO.

Has there ever been talk of making ActionForm an interface rather than a
class?  I'd much rather declare

public class PersonForm extends PersonVO 
        implements ActionForm
{
        ...
}

than what I've described above.

--
matt ho
indigo egg, inc.
providing VoiceXML professional services
http://www.indigoegg.com/


> -----Original Message-----
> From: Fletcher, Ken [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 04, 2001 1:54 PM
> To: '[EMAIL PROTECTED]'
> Subject: problem with struts and EJB
> 
> I am having a bit of trouble with struts and an EJB (entity bean).
> Instead
> of having getters and setters for each attribute in my entity bean, I
pass
> a
> javabean that has the same attributes and the getters and setters for
the
> attributes.  So, for example, let's say I have an entity bean with two
> attributes, firstName and lastName.  I have no getFirstName() or
> getLastName() method in the entity bean.  What I do have is a
getBean()
> method that returns a bean (not an entity bean) with firstName and
> lastName.
> This bean has the getters and setters in it.
> 
> 
> The ActionForm is the problem because when I use the same bean and
don't
> extend ActionForm it works OK.  My guess is, that although ActionForm
is
> serializable, some attribute in it is not.
> 
> Any help with this would be greatly appreciated.
> 
> Ken Fletcher
> Teacher Retirement System of Texas

Reply via email to