Re: generated code does not compile(2)
Leif Ashley <[email protected]>
| Newsgroups | gmane.comp.java.ejb.middlegen.user |
|---|---|
| Message-ID | <[email protected]> |
"> This works, believe it or not." Ok, ok... I believe you. I just need to figure out what's going on. I'll take a closer look at the example and see where I'm having issues. Thanks a ton for the info! --- Eivind Waaler <[email protected]> wrote: > Yes middlegen generates a FlightBean.java. Then xdoclet generates a > FlightCMP.java that has the following definition (notice how it extends > the FlightBean): > > public abstract class FlightCMP > extends airline.ejb.FlightBean > implements javax.ejb.EntityBean > { > public void ejbLoad() > { > } > > public void ejbStore() > { > } > > ... > > So FlightCMP extends FlightBean with the methods you're missing. Check > out the generated ejb-jar.xml file, notice the ejb-class: > > <ejb-class>airline.ejb.FlightCMP</ejb-class> > > This works, believe it or not. > > .eivind > > On Tue, 2 Mar 2004, Leif Ashley wrote: > > > As you said "Middlegen generates a FlightBean.java" - that bean java source > > file is the file that has to have the passivate, activate, etc. methods, > not > > the interfaces from xdoclet. > > > > Without those methods in the bean source file generated from middlegen, the > CMP > > entity beans are useless. > > > > --- Eivind Waaler <[email protected]> wrote: > > > The way middlegen works is to use xdoclet to generate the xxCMP class > that > > > has these methods. Please run the middlegen sample and check out the > > > resulting code. Middlegen generates a FlightBean.java file, then it uses > > > xdoclet to generate FlightCMP.java which has all the required methods. > > > > > > Not sure if this is the common way to use xdoclet, but it works and > > > deploys fine on jboss. > > > > > > .eivind > > > > > > On Mon, 1 Mar 2004, Leif Ashley wrote: > > > > > > > xDoclet is not a factor here. XDoclet runs agains tags in the bean > classes. > > > The > > > > methods we're talking about here are in those bean classes. MiddleGen > is > > > *NOT* > > > > putting those methods in the bean classes, and as such, generating > JBoss > > > CMP > > > > errors. > > > > > > > > If this isn't the case, please show me how. > > > > > > > > --- Eivind Waaler <[email protected]> wrote: > > > > > Hi again, > > > > > > > > > > The standard Middlegen airline sample (flight, person, reservation) > > > > > deploys on JBoss. The point is that XDoclet generates an xxCMP class > for > > > > > all the bean classes that contains the required methods. > > > > > > > > > > Seems like you've been using Middlegen without running XDoclet on the > > > > > generated code? If you look at the Middlegen sample you'll see how > > > > > Middlegen and XDoclet work together to generate complete code for > > > > > deployment. > > > > > > > > > > Regards > > > > > .eivindw. > > > > > > > > > > On Fri, 27 Feb 2004, Leif Ashley wrote: > > > > > > > > > > > Haug and Eivind Waaler: to the best of my knowledge, the methods: > > > > > > > > > > > > void ejbActivate() > > > > > > void ejbLoad() > > > > > > void ejbPassivate() > > > > > > void ejbRemove() > > > > > > void ejbStore() > > > > > > void setEntityContext(EntityContext ctx) > > > > > > void unsetEntityContext() > > > > > > > > > > > > ... are still required in CMP beans as per the J2EE spec. Even if > I'm > > > > > wrong, > > > > > > JBoss will definately require it because of how the reflection and > > > > > > dereferencing occures. I hit the same error today, and here's the > JBoss > > > > > error > > > > > > from my cactus report: > > > > > > > > > > > > null; CausedByException is: Method is not a known CMP field > accessor, > > > CMR > > > > > field > > > > > > accessor, or ejbSelect method: methodName=ejbActivate > > > > > > > > > > > > What a booger. On the up side, you should be able to include a > merge > > > file > > > > > even > > > > > > though I haven't tried it. > > > > > > > > > > > > ===== > > > > > > ------------------------------ > > > > > > - Leif Ashley (404) 550-3591 > > > > > > - J2EE / .NET Architect > > > > > > - Perception Consulting, Inc. > > > > > > ------------------------------ > > > > > > > > > > > > __________________________________ > > > > > > Do you Yahoo!? > > > > > > Get better spam protection with Yahoo! Mail. > > > > > > http://antispam.yahoo.com/tools > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > > > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > > > > > > Build and deploy apps & Web services for Linux with > > > > > > a free DVD software kit from IBM. Click Now! > > > > > > http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click > > > > > > _______________________________________________ > > > > > > middlegen-user mailing list > > > > > > [email protected] > > > > > > https://lists.sourceforge.net/lists/listinfo/middlegen-user > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > > > > > Build and deploy apps & Web services for Linux with > > > > > a free DVD software kit from IBM. Click Now! > > > > > http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click > > > > > _______________________________________________ > > > > > middlegen-user mailing list > > > > > [email protected] > > > > > https://lists.sourceforge.net/lists/listinfo/middlegen-user > > > > > > > > > > > > ===== > > > > ------------------------------ > > > > - Leif Ashley (404) 550-3591 > > > > - J2EE / .NET Architect > > > > - Perception Consulting, Inc. > > > > ------------------------------ > > > > > > > > __________________________________ > > > > Do you Yahoo!? > > > > Yahoo! Search - Find what youre looking for faster > > > > http://search.yahoo.com > > > > > > > > > > > > ------------------------------------------------------- > > > > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > > > > Build and deploy apps & Web services for Linux with > > > > a free DVD software kit from IBM. Click Now! > > > > http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click > > > > _______________________________________________ > > > > middlegen-user mailing list > > > > [email protected] > > > > https://lists.sourceforge.net/lists/listinfo/middlegen-user > > > > > > > > > > > > > ------------------------------------------------------- > > > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > > > Build and deploy apps & Web services for Linux with > > > a free DVD software kit from IBM. Click Now! > > > http://ads.osdn.com/?ad_id56&alloc_id438&op=click > > > _______________________________________________ > > > middlegen-user mailing list > > > [email protected] > > > https://lists.sourceforge.net/lists/listinfo/middlegen-user > > > > > > ===== > > ------------------------------ > > - Leif Ashley (404) 550-3591 > > - J2EE / .NET Architect > > - Perception Consulting, Inc. > > ------------------------------ > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! Search - Find what youre looking for faster > > http://search.yahoo.com > > > > > > ------------------------------------------------------- > > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > > Build and deploy apps & Web services for Linux with > > a free DVD software kit from IBM. Click Now! > > http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click > > _______________________________________________ > > middlegen-user mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/middlegen-user > > > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id56&alloc_id438&op=click > _______________________________________________ > middlegen-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/middlegen-user ===== ------------------------------ - Leif Ashley (404) 550-3591 - J2EE / .NET Architect - Perception Consulting, Inc. ------------------------------ __________________________________ Do you Yahoo!? Yahoo! Search - Find what youre looking for faster http://search.yahoo.com ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click