I tried to switched from jonas 2.0 to 2.1.1, but this introduces some
troubles ...
I have a SessionBean with the following Remote Interface:
public interface Repository
extends javax.ejb.EJBObject
{
LocalEntry getModule(String module) throws RemoteException;
Collection getChildren(int id) throws RemoteException;
// ...
Patch update(LocalEntry entry) throws RemoteException;
void commit(LocalEntry entry) throws RemoteException;
Patch add(LocalEntry parent, LocalEntry child) throws RemoteException;
void remove(LocalEntry entry) throws RemoteException;
}
The GenIC tool generates correct code for all methods in
JOnASRepositoryRemote except remove(LocalEntry entry). For this signature,
two methods are generated: the correct one and anotherone .. see below:
public synchronized void remove(com.innovidata.cg.local.LocalEntry p1)
throws java.rmi.RemoteException {
Trace.outln(Trace.DB_15, "JOnASRepositoryRemote.remove(LocalEntry)");
String methodSignature = "null" ;
RequestCtx rctx = preinvoke(2, methodSignature) ;
SessionContextImpl ctx = (SessionContextImpl)
rctx.getEJBContext();
com.innovidata.cg.ejb.RepositoryBean eb =
(com.innovidata.cg.ejb.RepositoryBean)ctx.getInstance();
try {
eb.remove(p1);
} catch (RuntimeException e) {
rctx.setSysExc(e);
throw new RemoteException("RuntimeException thrown by an" +
" enterprise Bean", e);
} catch (Error e) {
rctx.setSysExc(e);
throw new RemoteException("Error thrown by an enterprise "
+ "Bean", e);
} finally {
postinvoke(rctx);
}
}
public void remove(com.innovidata.cg.local.LocalEntry p1) throws
java.rmi.RemoteException {
Trace.outln(Trace.DB_15,
"JOnASRepositoryRemote.remove(LocalEntry)");
String methodSignature = "null" ;
RequestCtx rctx = preinvoke(2, methodSignature) ;
SessionContextImpl ctx = (SessionContextImpl)
rctx.getEJBContext();
try {
ctx.remove();
} catch (RuntimeException e) {
rctx.setSysExc(e);
throw new RemoteException("RuntimeException thrown by an" +
" enterprise Bean", e);
} catch (Error e) {
rctx.setSysExc(e);
throw new RemoteException("Error thrown by an enterprise" +
" Bean", e);
} finally {
postinvoke(rctx);
}
}
If I rename the method for example to "remove2" everything's fine. Only
one method is generated. As I browsed through the mailing list archive, I
noticed some threads about similar problems, regarding ejbs, that where
derived from other classes. My RepositoryBean is not derived from another
bean. Its header looks simply like this:
public class RepositoryBean implements javax.ejb.SessionBean
If I got something wrong, please tell me. I unfortunately do not have the
time, to track down a possible bug in GenIC at the moment.
Thanks in advance,
Holger
_/ _/ _/_/_/_/ Holger Engels /
_/ _/ _/ Joseph-Haydn-Weg 9 /
_/ _/ _/ 89134 Blaustein-Herrlingen /
_/_/_/_/ _/_/_/ -----------------------------
_/ _/ _/ Phone: +49 7304 434714 /
_/ _/ _/ Fax: 01805-66166645317 /
_/ _/ _/_/_/_/ EMail: [EMAIL PROTECTED] /
----
This list is cross-posted to two mail lists. To unsubscribe,
follow the instructions below for the list you subscribed to.
For objectweb.org: send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe ejb-container-group".
For enhydra.org: send email to [EMAIL PROTECTED] and include
in the body of the message "unsubscribe ejb-container-group".