-
1. Re: jbosscmp-jdbc.xml and Xdoclet
adrian.brock Oct 2, 2002 8:55 AM (in response to pepek)An example ejbdoclet target
apologies for the formatting :-)
It's for the latest version of xdoclet and
assumes you have the correct tags in your code.
Regards,
Adrian -
2. Re: jbosscmp-jdbc.xml and Xdoclet
pepek Oct 2, 2002 10:00 AM (in response to pepek)I found that all tags you mentioned are allready in my build.xml. So i tried to download newest version of Xdoclet. No success. Here is my files:
build.xml is as follows :
----------------------------------------------------------
<?xml version="1.0"?>
<!-- Set up java.class.path -->
<!-- Init -->
<!-- Prepare -->
<!-- Run EJBDoclet -->
<!-- Run WebDoclet -->
<!-- Compile -->
<!-- Compile EJBs -->
<!-- Create test file -->
<!-- Deploy to ... -->
<!-- Clean everything -->
<!-- Main -->
<!-- ========================================= -->
<!-- generate todo-list from on @info:todo tags -->
<!-- ========================================= -->
-------------------------------------------------
and my EBCounter.java is as follows :
-------------------------------------------------
package test;
import javax.ejb.*;
import java.*;
import test.*;
/**
* @author Petr MRAZ
* @version 0.001 (2002/30/09)
*
* @ejb:data-object
* container="false"
* setdata="false"
*
* @ejb:bean
* name="EBCounter"
* type="CMP"
* primkey-field="id"
* cmp-version="2.x"
* local-jndi-name="local/EBCounter"
* view-type="local"
*
* @ejb:home
* local-class="test.EBCounterLocalHome"
*
* @ejb:interface
* local-class="test.EBCounterLocal"
* home-ret="super"
*
*
* @ejb:pk
* class="java.lang.String"
*
* @ejb:transaction
* type="Required"
*
* @ejb:transaction-type
* type="Container"
*
* @jboss:table-name "ebcounter"
* @jboss:create-table "true"
* @jboss:remove-table "false"
* @jboss:tuned-updates "true"
* @jboss:read-only "false"
*
*/
public abstract class EBCounterBean implements javax.ejb.EntityBean
{
/**
* @ejb:pk-field
* @ejb:persistent-field
*
* @jboss:column-name "id"
*/
public abstract String getId();
public abstract void setId(String id);
/**
* @ejb:pk-field
* @ejb:persistent-field
*
* @jboss:column-name "text"
*/
public abstract String getText();
public abstract void setText(String text);
/**
* @ejb:pk-field
* @ejb:persistent-field
*
* @jboss:column-name "data"
*/
public abstract String getData();
public abstract void setData(String text);
/**
*
* @ejb:create-method
*/
public int ejbCreate(String text)
throws javax.ejb.CreateException
{
System.out.println("ejbCreate() called");
setData("kukacka letela prostorem...");
setText(text);
int a = 1;
return a;
}
public void ejbPostCreate(String text)
throws CreateException
{
}
public void ejbStore()
{
}
public void ejbLoad()
{
}
/**
* @ejb:remove-method
*
*/
public void ejbRemove()
throws javax.ejb.RemoveException
{
System.out.println("ejbRemove() called");
}
public void ejbActivate()
{
System.out.println("ejbActivate()");
}
public void ejbPassivate()
{
System.out.println("ejbPassivate()");
}
}
May be I did some fatal error while writing, but im realy newbie so i can see it. Thanks a lot.. -
3. Re: jbosscmp-jdbc.xml and Xdoclet
adrian.brock Oct 2, 2002 10:25 AM (in response to pepek)> jboss version="2.4"
jbosscmp is 3.0 only
2.x uses jaws.
Regards,
Adrian -
4. Re: jbosscmp-jdbc.xml and Xdoclet
pepek Oct 2, 2002 10:43 AM (in response to pepek)Uraaaa :)
Thank you very much Adrian..