Hi Philippe,
I'm sorry to have to report another bug in this area, but this has just
cropped up... The fact that method signatures are coded into the generated
code can result in JVM-version-dependency of the generated code. I.e. this
code was generated by GenIC under JDK 1.3.0 Win32:
public uk.org.rbgkew.sepasal.ejb.data.taxon.TaxonFacade
findByPrimaryKey(uk.org.rbgkew.sepasal.ejb.data.taxon.TaxonPK p1) throws
java.rmi.RemoteException, javax.ejb.FinderException {
Trace.outln(Trace.DB_15,
"JOnASTaxonFacadeHome.findByPrimaryKey(uk.org.rbgkew.sepasal.ejb.data.ta
xon.TaxonPK)");
JOnASTaxonFacadeRemote ejbobj = null;
String methodSignature = "public abstract strictfp
uk.org.rbgkew.sepasal.ejb.data.taxon.TaxonFacade
uk.org.rbgkew.sepasal.ejb.data.taxon.TaxonFacadeHome.findByPrimaryKey(uk
.org.rbgkew.sepasal.ejb.data.taxon.TaxonPK) throws
java.rmi.RemoteException,javax.ejb.FinderException" ;
RequestCtx rctx = preinvoke(2, methodSignature) ;
However, when run under JDK 1.2.2 Solaris, Method.toString() generates
"public abstract strict uk.org........... etc" for the above method. I.e.
with "strict" rather than "strictfp". Since MethodGuard is loaded up
dynamically at runtime using Method.toString(), this means that the
MethodGuard will not work if you try to run EJBs that were deployed under
1.3.0 Win32 in a Jonas server running under 1.2.2 Solaris. (Since the
methodSignature passed into JEntityHome.preinvoke differs from that loaded
into the MethodGuard).
This could be fixed this way: a method in Java is uniquely specified by the
class, method name, and parameter types. So instead of using
Method.toString() you could use a concatenation of the method name and
parameter types, both in the generated code, and in the code which loads up
MethodGuard at runtime. (You're already concatenating the EJB name so that
takes care of the class).
Sorry to be a bore but I think this is important! I think it ought to be
possible to run under JDK 1.2 EJBs that were deployed under JDK 1.3.
Regards,
Joe
=====================================================================
Joe Gittings, Royal Botanic Gardens, Kew
Hanover House, Kew, Richmond, Surrey TW9 3AB
[EMAIL PROTECTED]
+44 20 8332 5712
fax: +44 20 8332 5736
The SEPASAL database is now live at http://www.rbgkew.org.uk/ceb/sepasal/
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".