I was wondering if anyone could help me out with this issue.  I have seen a couple of 
posts on the list, but the responses were not helpful.

I get the following warning for SOME of my beans (session or entity, it doesn't seem 
to matter), but not all of them:

[Verifier]
Bean   : Service
Method : public abstract Service create(String) throws CreateException, RemoteException
Section: 9.2.8
Warning: The method return values in the home interface must be of valid types for 
RMI/IIOP.

Here is the home interface for that particular class:

public interface ServiceHome extends javax.ejb.EJBHome
{
        public Service create(String serviceName) throws    javax.ejb.CreateException, 
java.rmi.RemoteException;
        public Service findByPrimaryKey(ServicePK kpk) throws 
javax.ejb.FinderException, java.rmi.RemoteException;
        public java.util.Collection findAll() throws javax.ejb.FinderException, 
java.rmi.RemoteException;
}

I think this warning is bogus because I have other beans (which use almost exactly the 
same code, only the names are changed) which deploy with no problems.  And lest 
someone tell me that simply making the remote interface Serializabe will solve this 
problem, let me ask why that is necessary at all.  The remote and home interfaces will 
be shipped in a client jar, so the classes themselves should NOT have to be 
Serializable.  And besides, it should be up to the container to make sure that it 
sends client Serializable objects that also implement my remote or home interfaces.

A bean which deploys with no problem is the following:

public interface FolderHome extends javax.ejb.EJBHome
{
        public Folder create(String folderName) throws javax.ejb.CreateException, 
java.rmi.RemoteException;
        public Folder findByPrimaryKey(FolderPK fpk) throws javax.ejb.FinderException, 
java.rmi.RemoteException;
        public java.util.Collection findByFolderName(String folderName) throws 
javax.ejb.FinderException, java.rmi.RemoteException;
}

The definitions of Folder and Service are nearly identical:

public interface Service extends javax.ejb.EJBObject
{
        public long getServiceID() throws java.rmi.RemoteException;
        public java.lang.String getServiceName() throws java.rmi.RemoteException;
        public void setServiceName(String newName) throws java.rmi.RemoteException;
        public String getHostIP() throws java.rmi.RemoteException;
        public void setHostIP(String hostName) throws java.rmi.RemoteException, 
javax.ejb.EJBException;
}

public interface Folder extends javax.ejb.EJBObject
{
        public long getFolderID() throws java.rmi.RemoteException;
        public java.lang.String getFolderName() throws java.rmi.RemoteException;
        public void setFolderName(String newName) throws java.rmi.RemoteException;
        public long getServiceID() throws java.rmi.RemoteException;
        public void setServiceID(int serviceID) throws java.rmi.RemoteException;
}

Except for the different method names and the different implementations in the bean 
itself, they are functionally identical, at least they should be to the deployer.  Yet 
it complains about Service, but not Folder.

My question is:  why does this happen for some beans, but not others?

I saw a previous response to another user's similar requst, that suggested I could 
only return Java primitives or their Serializable counterparts (java.lang.Long, 
java.lang.Integer, etc.).  The user also suggested that you could return a Collection, 
but Collection doesn't implement Serializable, so why should it function differently?  
These seem unreasonable restrictions and I can't believe that they are the case.  Does 
anyone have any experience with this problem?  Thanks in advance for your help.

Matt Dubord


Get 250 color business cards for FREE!
http://businesscards.lycos.com/vp/fastpath/

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

Reply via email to