oh this is a version with @jboss.query
please
replace @jboss.query with @ejb.finder

thats how i want to do it, but it doesn`t work

On Fri, 2006-01-06 at 14:06 +0100, Juraj Holtak wrote:
> Hi,
> 
> I`m using JBoss 4.0.2 and XDoclet 1.2.3
> 
> my problem is, that all @ejb.finder tag are simply ignored and nothing
> is generated at all, nor in interfaces, nor in .xml files.
> 
> My only finder method in the interfaces is findByPrimaryKey(...).
> 
> my files look like this:
> 
> build.xml - relevant part
> 
> <target name="ejbdoclet" depends="init">
>               <taskdef
>                       name="ejbdoclet" 
> classname="xdoclet.modules.ejb.EjbDocletTask"
>                       classpathref="classpath"
>               />
>               
>               <tstamp>
>                       <format property="TODAY" pattern="d-MM-yy"/>
>               </tstamp>
>               
>               <ejbdoclet destdir="${generated.sources.dir}"
> excludedtags="@version,@author" addedtags="@xdoclet-generated at
> ${TODAY}" ejbspec="2.0">
>                       <fileset dir="${sources.dir}">
>                               <include name="**/*Bean.java"/>
>                       </fileset>
>                       
>                       <session/>
>                       
>                       <dataobject/>
>                       
>                       <packageSubstitution packages="persistence"
> substituteWith="interfaces"/>
>                       
>                       <remoteinterface pattern="{0}Remote"/>
>                       <localinterface pattern="{0}"/>
>                       
>                       <homeinterface/>
>                       <localhomeinterface/>
>                       
>                       <entitypk/>
>                       <entitycmp cmpSpec="2.x"/>
>                       
>                       
>                       <deploymentdescriptor 
> destdir="${build.dir}/ejb/META-INF"/>
>                       <jboss version="4.0"
>                               preferredRelationMapping="relation-table"
>                               datasource="java:/DefaultDS"
>                               datasourcemapping="Hypersonic SQL"
>                               destdir="${build.dir}/ejb/META-INF"
>                               removeTable="true"
>                               alterTable="true"
>                               debug="true"
>                       />
>                       
>               </ejbdoclet>
>       </target>
> 
> 
> and this bean
> 
> 
> /**
>  * @ejb.bean
>  *            name="swa-bookstore/Book"
>  *            type="CMP"
>  *            cmp-version="2.x"
>  *            jndi-name="swa-bookstore/Book"
>  *            primkey-field="id"
>  *            view-type="both"
>  *
>  * @ejb.pk class="java.util.Long"
>  * 
>  *  
>  * @jboss.query signature="java.util.Collection findAll()"
>  *  query="select object(b) from BookBean as b"
>  *  
>  * @jboss.persistence
>  *    remove-table="true"
>  *  alter-table="true"
>  *  create-table="true"
>  *  
>  * @ejb.permission
>  *    unchecked="true"
>  * 
>  * 
>  *
>  */
> package org.proaut.uni.bookstore.ejb;
> 
> import java.rmi.RemoteException;
> 
> import javax.ejb.CreateException;
> import javax.ejb.EJBException;
> import javax.ejb.EntityBean;
> import javax.ejb.EntityContext;
> 
> import org.jboss.util.id.GUID;
> import org.jboss.util.id.UID;
> 
> public abstract class BookBean implements EntityBean {
> 
>       protected EntityContext entityContext;
> 
>       /**
>        * Getter for CMP Field primkey
>        * 
>        * @ejb.interface-method view-type="both"
>        * 
>        * @ejb.persistence
>        * 
>        * @ejb.pk-field
>        * 
>        */
>       public abstract String getId();
> 
>       /**
>        * Setter for CMP Field primkey
>        * 
>        * @ejb.interface-method view-type="both"
>        */
>       public abstract void setId(String id);
> 
>       /**
>        * Getter for CMP Field title
>        * 
>        * @ejb.persistence
>        * @ejb.interface-method view-type="both"
>        */
>       public abstract String getTitle();
> 
>       /**
>        * Setter for CMP Field title
>        * 
>        * @ejb.interface-method view-type="both"
>        */
>       public abstract void setTitle(String title);
> 
>       /**
>        * Getter for CMP Field title
>        * 
>        * @ejb.persistence
>        * @ejb.interface-method view-type="both"
>        */
>       public abstract String getAuthors();
> 
>       /**
>        * Setter for CMP Field title
>        * 
>        * @ejb.interface-method view-type="both"
>        */
>       public abstract void setAuthors(String authors);
> 
>       /**
>        * Getter for CMP Field title
>        * 
>        * @ejb.persistence
>        * @ejb.interface-method view-type="both"
>        */
>       public abstract String getKeywords();
> 
>       /**
>        * Setter for CMP Field title
>        * 
>        * @ejb.interface-method view-type="both"
>        */
>       public abstract void setKeywords(String keywords);
> 
>       /**
>        * Getter for CMP Field title
>        * 
>        * @ejb.persistence
>        * @ejb.interface-method view-type="both"
>        */
>       public abstract String getKwak();
> 
>       /**
>        * Setter for CMP Field kwak
>        * 
>        * @ejb.interface-method view-type="both"
>        */
>       public abstract void setKwak(String kwak);
> 
>       /*
>        * public java.lang.Object ejbCreate() throws CreateException
> { try{ return
>        * null; }catch (Exception e) { throw new EJBException(e); } }
>        */
> 
>       public void setEntityContext(EntityContext arg0) throws EJBException,
>                       RemoteException {
>               entityContext = arg0;
>       }
> 
>       public void unsetEntityContext() throws EJBException, RemoteException {
>               entityContext = null;
>       }
> 
>       /**
>        * @ejb.create-method
>        */
>       public BookPK ejbCreate(String title, String authors, String keywords)
>                       throws CreateException {
>               System.out.println("BOOK -> ejbCreate");
>               this.setTitle(title);
>               this.setAuthors(authors);
>               this.setKeywords(keywords);
>               // this.setId((Long)entityContext.getPrimaryKey());
>               System.out.println("");
>               this.setId(GUID.asString());
>               return null;
>       }
> 
> }
> 
> 
> the findAll finder is not generated.
> 
> Please help, because my deadline is very soon.
> 
> thanks,
> juraj
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> xdoclet-user mailing list
> xdoclet-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
xdoclet-user mailing list
xdoclet-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to