[EMAIL PROTECTED] wrote:

I try to use the @ejb.select tag. But it does not work for me.

I am declaring the following methods:

-----------------------------------------------------------------------------------------------------------------

/**
* @ejb.select
* query = "select a.amount from jrnl a where a.simid = ?1 and a.periodid = ?2 and a.creditacc = ?3"
* result-type-mapping = "Local"
*
*/
*public* *abstract* Set ejbSelectCreditAmountList( Long simid, Integer period, String acc );


/**
* @ejb.select
* query = "select a.amount from jrnl a where a.simid = ?1 and a.periodid = ?2 and a.debitacc = ?3"
* result-type-mapping = "Local"
*/
*public* *abstract* Set ejbSelectDebitAmountList( Long simid, Integer period, String acc );


------------------------------------------------------------------------------------------------------------------

When I deploy thiis, I get the following log from my JBoss:

------------------------------------------------------------------------------------------------------------------
21:38:19,531 WARN [verifier] EJB spec violation:
Bean : JournalCMP
Method : public abstract Set ejbSelectCreditAmountList(Long, Integer, String)
Section: 10.6.7
Warning: Select methods of an entity bean class must define javax.ejb.FinderException in their throws clause.
21:38:19,541 WARN [verifier] EJB spec violation:
Bean : JournalCMP
Method : public abstract Set ejbSelectDebitAmountList(Long, Integer, String)
Section: 10.6.7
Warning: Select methods of an entity bean class must define javax.ejb.FinderException in their throws clause.


------------------------------------------------------------------------------------------------------------------

When I supply the FinderExceptionn to the methods, they are included neither into the home nor in the ejb interface.

What am I doing wrong?

I can't say, but here's a clip from one of my attempts at doing something similar for JBoss 3.2.3. It deploys fine. But beware of thinking that it's necessarily right: I cannot run this where the database's summation results are anything other than NULL without getting a mysterious ClassCastException. Still trying to figure that out -- and if anyone has any suggestions, I'd be very grateful.

/**
* An EJB select method for a sum of rainfall over a period of
* time. Since our Jboss doesn't support EJB2.1 where the SUM is
* added to EJB-QL, we'll over-ride with Jboss-QL for the moment.
*
* @ejb.select query="SELECT SUM(r.rainfall) FROM Rainfall AS r WHERE r.type=?1 AND r.watershedId = ?2 AND r.time >= ?3 AND r.time < ?4"
* result-type-mapping="Local"
*/
public abstract Float ejbSelectRainfallSumByTypeAndWatershedAndTimeRange(Integer t, String w, Long a, Long z)
throws FinderException;


/**
* Home method to use the
* ejbSelectRainfallSumByTypeAndWatershedAndTimeRange method that
* returns the sum, since it cannot be used directly.
*
* @ejb.home-method view-type="remote"
*/
public Float ejbHomeGetRainfallSumOverTime(Integer t, String w, Long a, Long z) throws FinderException {
return ejbSelectRainfallSumByTypeAndWatershedAndTimeRange(t, w, a, z);
}


--jcc

--
"He who fights with monsters should look to it that he himself does not become a monster. 
And when you gaze long into an abyss the abyss also gazes into you."



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to