Hi,
I have a problem with the method signature for my select method not
appearing in the generated CMP class (I'm using EJB 2.0 local CMP entity
beans). Therefore I can't compile my application.
I have declared a select method like this in my local Partner entity bean:
* @ejb:select signature="java.lang.String
* selectPartnerIdByBenutzerNamePasswort (java.lang.String
benutzerName,
* java.lang.String passwort)" query="SELECT p.partnerId FROM Partner
as p
* WHERE p.benutzer.benutzerName = ?1 AND p.benutzer.passwort = ?2"
* result-type-mapping="Local"
Then I have a business method in the bean which makes use of the select
method:
/*
* Gets the partnerID based on the corresponding user's username and
* password.
* @ejb:interface-method
*/
public String getPartnerIdByUsernameAndPassword( String benutzerName,
String passwort )
{
try
{
return ejbSelectPartnerIdByBenutzerNamePasswort( benutzerName,
passwort );
}
catch ( FinderException fe )
{
return null;
}
}
After running Ant, the business method signature above is correctly
generated in the local interface and ejb-jar.xml contains a select method
with the correct info declared in my ejb:select tag above.
However, when compiling my code (after ejbDoclet has done its job) I get the
following error:
compile-ejbs:
[javac] Compiling 5 source files to C:\myapp\build\ejb\classes
[javac]
C:\myapp\src\com\logica\insurance\joap\partner\entity\Partner.java:6
30: cannot resolve symbol
[javac] symbol : method ejbSelectPartnerIdByBenutzerNamePasswort
(java.lan
g.String,java.lang.String)
[javac] location: class com.logica.insurance.joap.partner.entity.Partner
[javac] return ejbSelectPartnerIdByBenutzerNamePasswort(
benutze
rName, passwort );
[javac] ^
[javac] 1 error
BUILD FAILED
Anyway, problems seems to be that the method signature for the select method
which should be like
public abstract ejbSelectPartnerIdByBenutzerNamePasswort(
StringbenutzerName, String passwort ) throws FinderException;
is NOT generated in the code generated by EJBDoclet, i.e. in the CMP class
which extends the bean class.
What is going on here? Have I trapped a bug or is there something wrong in
my declaration. Any insight into this would be greatly appreciated since I
really wouldn't like to live without the select methods.
Thanks,
Bernie
P.S. I using the latest binary build for XDoclet.
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user