Hi there,

Ive been trying to use remotefacade and have imbedded these tags into my
beans.


/**
 * @ejb.bean
*     name="Item"
*     jndi-name="ejb/orderApp/Item"
*     view-type="local"
*     primkey-field="id"
*
* @ejb.facade
*   name="ItemFacade"
*
* @ejb.value-object
*     name="Item"
*     match="*"
*/

This causes code to get created correctly for everything except for:



/**
 * @ejb.interface-method
 * @ejb.facade-method
 * 
*/
          public java.util.Collection findAll() throws
javax.ejb.FinderException,  javax.naming.NamingException{
                 java.util.Collection selected = getLocalHome().findAll(  );

                        ArrayList retval = new ArrayList(selected.size());
                        for(Iterator i = selected.iterator(); i.hasNext();) {
                           
retval.add(((orderApp.interfaces.ItemLocal)i.next()).getData());
                        }

                 return retval;
          }

And this...:

           public orderApp.interfaces.ItemData
findByPrimaryKey(java.lang.String pk) throws javax.ejb.FinderException, 
javax.naming.NamingException {
                 orderApp.interfaces.ItemLocal selected =
getLocalHome().findByPrimaryKey( pk );

                        orderApp.interfaces.ItemData retval = selected.getData();

                 return retval;
          }

And this...
   public orderApp.interfaces.ItemData
create(orderApp.interfaces.ItemValue v)
   throws javax.ejb.CreateException , java.rmi.RemoteException , 
javax.naming.NamingException
   {
        return getLocalHome().create(v).getData();
   }

Am I wrong in assuming that the returned objects should be Value Objects
and not ItemData objects? This compiles:

   // finder methods

/**
 * @ejb.interface-method
 * @ejb.facade-method
 * 
*/
          public java.util.Collection findAll() throws
javax.ejb.FinderException,  javax.naming.NamingException{
                 java.util.Collection selected = getLocalHome().findAll(  );

                        ArrayList retval = new ArrayList(selected.size());
                        for(Iterator i = selected.iterator(); i.hasNext();) {
                          
retval.add(((orderApp.interfaces.ItemLocal)i.next()).getItemValue());
                        }

                 return retval;
          }

/**
 * @ejb.interface-method
 * @ejb.facade-method
 * 
*/
           public orderApp.interfaces.ItemValue
findByPrimaryKey(java.lang.String pk) throws javax.ejb.FinderException, 
javax.naming.NamingException {
                 orderApp.interfaces.ItemLocal selected =
getLocalHome().findByPrimaryKey( pk );

                        orderApp.interfaces.ItemValue retval =
selected.getItemValue();

                 return retval;
          }

// create methods

   /**
    * @ejb.interface-method
    * @ejb.facade-method invalidate="true"

    */

   public orderApp.interfaces.ItemValue
create(orderApp.interfaces.ItemValue v)
   throws javax.ejb.CreateException , java.rmi.RemoteException , 
javax.naming.NamingException
   {
        return getLocalHome().create(v).getItemValue();
   }

// update method

I have a further issue which may be related to this but I will outline
it in another email to keep it useful to other xdoclet users searching
for similar problems.

It may be me. If so, could someone explain which bit I've got wrong.

TIA for any help

Stuart Guthrie



-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to