Re: generated code does not compile

Eivind Waaler <[email protected]>
Newsgroups gmane.comp.java.ejb.middlegen.user
Message-ID <[email protected]>
Hi, you don't need those methods when using CMP. That's why the bean class
is abstract i think..

Just try to deploy it. The server is supposed to create the implementation
itself. Some, like Weblogic, require special compilation (with ejbc tool)
others, as JBoss, do the implementation at deploy time i think.

Cheers
.eivind

On Fri, 27 Feb 2004 [email protected] wrote:

> Hello,
>
> the generated bean contains the following line:
> public abstract class ContainerBean implements javax.ejb.EntityBean {
>
> The javax.ejb.EntityBean interface requires the following methods and they
> are not part of the generated code.
> void ejbActivate()
> void ejbLoad()
> void ejbPassivate()
> void ejbRemove()
> void ejbStore()
> void setEntityContext(EntityContext ctx)
> void unsetEntityContext()
>
> I don't want to modify the generated code by hand if possible.
>
> How to include these methods?
>
> Thanks
>       Haug
>
>
>
> My ant task looks like:
>
>   <target name="generate_ejbs_from_db"
>           depends=""
>           description="Run Middlegen" >
>     <taskdef name="middlegen"
>              classname="middlegen.MiddlegenTask"
>              classpathref="middlegen.class.path" />
>     <middlegen appname="EntityBeanPerformance"
>                databaseurl="jdbc:oracle:thin:@gam-ora9-dev:1521:ORCL"
>                driver="oracle.jdbc.driver.OracleDriver"
>                username="J2EE"
>                password="xxxx"
>                datasourceJNDIName="java:/OracleDS"
>                providerURL="dummy"
>                initialContextFactory
> ="org.jnp.interfaces.NamingContextFactory"
>                gui="true" >
>       <cmp20 destination="src"
>              interfacepackage="com.vanderlande.lsg.wms.persistence"
>              fkcmp="true"
>              jndiprefix="wms/persistence"
>              package="com.vanderlande.lsg.wms.persistence"
>              viewtype="both">
>       </cmp20>
>       <table name="CONTAINER" />
>       <table name="CONTAINERTYPE" />
>       <table name="DELIVERY" />
>       <table name="DELIVERYLINE" />
>       <table name="ITEM" />
>       <table name="ITEMGROUP" />
>       <table name="ITEMGROUPATTRIBUTE" />
>       <table name="LOCATION" />
>       <table name="LOCATIONGROUP" />
>       <table name="LOCATIONGROUPMEMBER" />
>       <table name="LOCATIONTYPE" />
>       <table name="SKU" />
>       <table name="TRANSPORTTASK" /


-------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.