how to remove OBJECT from BasicIdentifyingSystem

yiming wang <[email protected]> Wed, 23 Apr 2003 18:15:21 -0700 (PDT)
Newsgroups gmane.comp.java.nanning.devel
Message-ID <[email protected]>
hi all,

In order to remove one object from
basicIdentifyingSystem, like "ejbRemove". I thought
out the follow solution:
in object interface add this:
/**
 * @transaction
 */
public void remove();

in object implementation add this:
public void remove() {
}

in PrevaylerInterceptor.java add this:
 public Object invoke(Invocation invocation) throws
Throwable {
   	// added by [email protected], 
       //to support remove     object function
	if (CurrentPrevayler.isInTransaction()
            && 
CurrentPrevayler.getSystem().hasObjectID(invocation.getProxy()))
{
if
(invocation.getMethod().getName().equalsIgnoreCase("remove"))
{
				CurrentPrevayler.getSystem().unregisterObjectID(
					invocation.getProxy());
			}
		}
......

that can be work. is it right? any better solutions?

thanks!

wang yiming
2003.4.24

__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf