I fixed the create-method bug. I apologize, that was because of my
changes.

I agree with you that we need unit testing for Xdoclet. Why we haven't
done it already is because Xdoclet wasn't junit-friendly and btw this
tool started as a little tool for generating ejb interfaces and now is
more or less a framework. Another issue is how to unit test it after
all. Let me explain what the create-method bug was. I changed home
templates yesterday (refactored the templates!), but I mistakenly
changed one part to:

  <XDtEjbSession:ifStatelessSession>
   public <XDtEjbIntf:componentInterface type="remote"/> create() throws
javax.ejb.CreateException, java.rmi.RemoteException;
  </XDtEjbSession:ifStatelessSession>
  <XDtEjbSession:ifStatefulSession>
   <XDtMethod:forAllMethods>
    <XDtEjbHome:ifIsCreateMethod>
<XDtMethod:methodComment indent="3"/>
   public <XDtEjbIntf:componentInterface type="remote"/>
create(<XDtParameter:parameterList/>) <XDtMethod:exceptionList
append="java.rmi.RemoteException,javax.ejb.CreateException"/>;
    </XDtEjbHome:ifIsCreateMethod>
   </XDtMethod:forAllMethods>
  </XDtEjbSession:ifStatefulSession>

the problem is the second ifStatefulSession block which should be
ifNotStatelessSession. So tell me how could we write a unit test for
this template file? It's like writing unit tests for jsp files! I don't
have a good solution. Maybe Xdoclet-users could shed a light....

Btw, we can and we will add unit tests for the normal java sources of
Xdoclet. It's now junit-friendly, should be possible to write unit tests
for blablaTagsHandlers easily, they are completely independent from the
rest of the world. We'll try it after v1.1 release.

Cheers,
Ara. 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of James
Higginbotham
Sent: Sunday, December 09, 2001 7:20 AM
To: [EMAIL PROTECTED]
Subject: [Xdoclet-user] Create() in CMP Missing?
Importance: High

I just obtained the latest CVS about 10 minutes ago, built it, replaced
the jar with the new one, and discovered that none of my ejbCreate()
methods are being honored. I just built the samples and noticed the same
thing. Anyone else seeing this?
�
I am also seeing a problem with CMPs that only have a local interface
not getting the <local> and <localhome> entries generated in their
ejb-jar.xml file. Anyone seeing this as well?
�
I'm getting a bit frustrated with trying to use this tool, though the
goals are honorable. I am concerned that there are no regression tests
being performed to ensure that the most basic concepts, such as create()
methods, are continuing to be generated. It also prevents quick
determination of whether WebLogic and JBoss support is broken or not. Am
I missing something with your project, or is this the case? If so, what
are the plans for implementing unit tests and other forms of regression
testing when introducing new features or bug fixes?
�
Currently, I am spending more time getting around XDoclet 'features'
than writing code - I hope this will change, as I don't want to abandon
XDoclet unless it is necessary. 
�
Attached is my source file, along with the generated code. You can build
your samples project and look at the AccountBean to see the same
problem.The home contains only finders and no create() methods. 
�
Best Regards,
James


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to