Hi - D'Averc here agin - just had a play with my xdoclet environment and
added your tags. My environment is JBoss IDE which has an xdoclet engine
built in - so it does a lot of the thinking for me.. when i added an
ejbcreate method to a bean with your tags in it it generated
/**
* Create method
* @ejb.create-method view-type = "local"
*/
public Integer ejbCreate() throws javax.ejb.CreateException {
// TODO Auto-generated method stub
return null;
}
/**
* Post Create method
*/
public void ejbPostCreate() throws javax.ejb.CreateException {
// TODO Auto-generated method stub
}
This is slightly different to what you have so please give it a try.
Good luck,
D'Averc
rapunzel wrote:
>
> Hello!
>
> I am trying to generate EJB Interfaces with XDoclet.
> Everything works fine, but the create-Methode in the LocalHomeInterface
> isn't generated.
>
> Here is my EntityBean:
>
> (...)
>
> /**
> * BenutzerEJB
> *
> * @ejb.bean type="CMP" name="Benutzer" reentrant="false"
> primkey-field="id" view-type="local"
> * jndi-name="com.xxx.xxx.benutzer.ejb.BenutzerLocalHome"
> local-jndi-name="com.xxx.xxx.benutzer.ejb.BenutzerLocalHome"
> * @ejb.finder query="SELECT OBJECT(p) FROM BenutzerEJB AS p"
> signature="java.util.Collection findAll()"
> * @ejb.finder query="SELECT OBJECT(p) FROM BenutzerEJB AS p WHERE
> p.user=?1" signature="com.xxx.xxx.benutzer.ejb.BenutzerLocal
> findByUser(java.lang.String userid)"
> * @ejb.finder query="SELECT OBJECT(p) FROM BenutzerEJB AS p WHERE
> p.ldapUserId=?1" signature="com.xxx.xxx.benutzer.ejb.BenutzerLocal
> findByLdapUserId(java.lang.String userid)"
> * @ejb.finder query="SELECT OBJECT(p) FROM BenutzerEJB AS p WHERE p.name
> like ?1" signature="java.util.Collection
> findByStartcharacter(java.lang.String character)"
> * @ejb.persistence table-name="T_Benutzer"
> * @weblogic.data-source-name afm_tx_DS
> * @weblogic.automatic-key-generation generator-type="ORACLE"
> generator-name="BENUTZER" key-cache-size="10"
> */
> public abstract class BenutzerEJB implements EntityBean {
>
> private EntityContext ctx = null;
> private transient Category cat = Category.getInstance(this.getClass());
>
> public BenutzerEJB() {
> }
>
> public void ejbActivate() throws EJBException {
> }
>
> public void ejbLoad() throws EJBException {
> }
>
> public void ejbPassivate() throws EJBException {
> }
>
> public void ejbRemove() throws RemoveException, EJBException {
> }
>
> public void ejbStore() throws EJBException {
> }
>
> public void setEntityContext(EntityContext entityContext) throws
> EJBException {
> ctx = entityContext;
> }
>
> public void unsetEntityContext() throws EJBException {
> ctx = null;
> }
>
> public Integer ejbCreate() throws CreateException {
> return null;
> }
>
> public void ejbPostCreate() throws CreateException {
> }
>
> /**
> * @ejb.interface-method view-type="local"
> * @ejb.persistence column-name="user"
> * @ejb.transaction type="Required"
> * @ejb.permission role-name="afmrole"
> */
> public abstract String getUser();
>
> (...)
>
>
> If I add
> /**
> * @ejb.create-method
> */
> to the ejbCreate-method the generation stops after generating this:
>
> /**
> * Local home interface for Benutzer.
> * @xdoclet-generated
> */
> public interface BenutzerLocalHome
> extends javax.ejb.EJBLocalHome
> {
> public static final String COMP_NAME="java:comp/env/ejb/BenutzerLocal";
> public static final String
> JNDI_NAME="com.xxx.xxx.benutzer.ejb.BenutzerLocalHome";
>
>
>
> The Exception is the following:
> (XDocletMain.start 54 ) <<Running XDoclet failed.:
> xdoclet.template.TemplateException: Invoking method in class
> xdoclet.modules.ejb.home.HomeTagsHandler failed: forAllHomeMethods, line=9
> of template file:
> jar:file:/C:/programme/xdoclet-1.2.3/lib/xdoclet-ejb-module-1.2.3.jar!/xdoclet/modules/ejb/home/resources/home-local.xdt,
> exception: null>>
>
>
> What is going wrong?
> Please help me ;-(
>
>
--
View this message in context:
http://www.nabble.com/problem-with-create-method-in-local-home-entity-bean-tf3220254.html#a8979251
Sent from the xdoclet-user mailing list archive at Nabble.com.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
xdoclet-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user