My question is. Does anybody has any happy experience with CMP/CMR entity bean inheritance? Is it possible? Are there any limitations or any special care I should take?
----- Original Message ----- From: "Torsten Kruse" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 01, 2003 11:36 AM Subject: [Xdoclet-user] EntityBean inheritence problems > Hi! > > I'm a xdoclet newbie and try to generate and deploy java classes for two > entity bean with inheritence. With Person alone everything works fine. > (I looked at the xdoclet examples for inheritence, but there no VO are > generated and the Customer has no further attributes as Person. So this > doesn't help me. > > My simplified example: Person with name and age, Foreigner extends > Person and adds nation and language. > The generation of the Person entity bean with all classes and value > objects is ok. > But when Foreigner should be created, I get some difficulties. > > 1. In ForeignerCMP after /* Value Objects BEGIN */ the get/setPersonVO > is generated (which so far is not nice but ok) but in getPersonVO I have > PersonVO.setNation and setLanguage. These attributes are supported by > ForeignerVO but not by PersonVO and so I get a compile error. > Note: In the setPersonVO there are no getNation or getLanguage, this > seems to be ok. > > Is this a bug or what's wrong with my code/tags? > Is there any possibility to avoid the generation of the Person stuff in > ForeignerCMP? > > 2. Environment entries > Person has: @ejb:env-entry name="SequenceName" value="PersonEntity" > Foreinger has: @ejb:env-entry name="SequenceName" > value="ForeignerEntity" > > I use these to generate unique Ids in the database. Each object should > have ist own queue. The name of the queue can be read in the environment > entry. But because of the inheritence I get two env-entries with the > same name in the deployment descriptor. > <env-entry> > <env-entry-name>SequenceName</env-entry-name> > <env-entry-type>java.lang.String</env-entry-type> > <env-entry-value>ForeignerEntity</env-entry-value> > </env-entry> > <env-entry> > <env-entry-name>SequenceName</env-entry-name> > <env-entry-type>java.lang.String</env-entry-type> > <env-entry-value>PersonEntity</env-entry-value> > </env-entry> > > Jboss complains about this: Could not set up environment; - nested > throwable: (javax.naming.NameAlreadyBoundException)] > > Is there any possibilty to avoid the generation of the env-entry from > Person? > > Thanks for any help. > > -- > Bye > Torsten > > > > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 > _______________________________________________ > xdoclet-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/xdoclet-user > ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
