Luke,

In general, it is not really to use an innerclass as a type in a public api.
In EJB it is a worse Idea.  I think the verifier is complaining that your
class is not serializable.  On page 217 of Josh Block's book Effective Java
her states "Inner classes should rarely, if ever, implement Serializable."
He then goes on to explain the synthetic fields generated by the compiler,
and concludes with "Therefore, the default serialized form of an inner class
is ill-defined. A static memeber class can, however, implement Serializable
[because it doesn't have synthetic fields]"

I looks like you are implementing the Value Object Pattern, and I would
recomend sepperate class for the Value Object.  If you leave it in your bean
impl class you will have to distribute the bean impl to all you clients, and
you will be unable to swap a new implementation into your app.

-dain
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 03, 2001 9:59 AM
Subject: [JBoss-dev] Apparent bug in Verifier - static inner classes as
valid RMI/IIOP types


Hi all,

Can't get any access to Sourceforge so posting here instead...

I tried moving a value data bean (AgentData) into the interface for the
entity bean that it represents and the verifier
(jboss_2.2.2_tomcat_2.2.2) doesn't seem to approve, with messages along
the lines of:

[Verifier]
Bean   : UserManager
Method : public abstract Agent$Data getAgentData(String) throws
RemoteException
Section: 6.10.5
Warning: The method return values in the remote interface must be of
valid types
for RMI/IIOP.

I think it must be falling foul of the following lines in
AbstractVerifier.java:

/*
* If class is a non-static inner class then its containing
class must
* also be a conforming RMI/IDL value type.
*
* Spec 2.8.4 (3)
*/
if (type.getDeclaringClass() != null && isStatic(type))
if (!isRMIIDLValueType(type.getDeclaringClass()))
return false;

which, if the comment is correct should probably read "!isStatic(type)"
instead ???

Luke.

--
Neu: sunrise hat jetzt noch günstigere Surfpreise!
Sofort profitieren!  http://go.sunrise.ch/de/promo1



_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to