Hi,
In remote interface of my entity bean I declare toString
function throws
RemoteException, but get error in compilation.
//Company.java
public interface Company extends javax.ejb.EJBObject {
public String toString()
throws RemoteException;
}
// error
Company.java: Error #: 462 :
method toString() in interface
com.filonet.filosafe.server.ejb.company.Company cannot
override method
toString() in class java.lang.Object, overridden
method does not throw
java.rmi.RemoteException at line 10, column 19
It's strange because of I can compile it with Sun's JDK 1.3.0_02
I would say, that _this_ is strange. This violates the Java language
specification. You cannot override method and _add_ exceptions to its
signature. This is because, if some of the code that uses your superclass
has no try/catch clause, your exception will go up and so on.
So, what you do, is _not_ legal.
Regards,
Roman.
___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user