Well a simpler one is

removeHome(....) {

        // The first argument is the handle or PK
        EJBObject object = getHome.findByPK(pk);

        object.remove();
}

and you are done.

marc


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Ken Jenks
> Sent: Friday, August 04, 2000 2:35 PM
> To: jBoss Developer
> Subject: [jBoss-Dev] Implementing the removeHome() method
>
>
> Re:
>    http://www.telkel.com/bugzilla/show_bug.cgi?id=45
>
> What all is involved in implementing the removeHome() method?
>
> Right now, the method is Not Yet Implemented in EntityContainer.java:
>
>     // EJBHome implementation ----------------------------------------
>     public void removeHome(Method m, Object[] args,
> EntityEnterpriseContext
> ctx)
>        throws java.rmi.RemoteException, RemoveException
>     {
>        throw new Error("Not yet implemented");
>     }
>
> The way I see it, we'll need to (1) call the bean's "I'm about to be
> removed" ejbRemove() method, (2) un-bind the name from the JNDI, (3) find
> and cancel any transactions involving the bean, (4) call the bean's
> unsetEntityContext(), (5) remove the bean from the
> PersistenceManager, and
> (6) remove the bean from the database.
>
> Is that all?
>
> Is that the right order?
>
> If (3) through (6) fail, should we re-bind the name to the JNDI?
>
> If we do (4) will that do (5) automatically?
> If we do (5) will that do (6) automatically? Or is there more
> work to be done?
>
> -- Ken Jenks, http://abiblion.com/
>
>     Tools for reading.
>
>


Reply via email to