RE: how to remove OBJECT from BasicIdentifyingSystem

"Jon Tirsen" <[email protected]> Thu, 24 Apr 2003 07:27:27 +0200
Newsgroups gmane.comp.java.nanning.devel
Message-ID <001101c30a22$33053150$6c4a59d5@jon>
Actually, I've just removed the whole BasicIdentifyingSystem as I'm
using a new feature that I wrote for Prevayler 2. Object ids are no
longer required for using the Prevayler-persistence-framework. Many
applications might need object ids for other purposes but at least it
makes the Prevayler-framework much simpler (actually about half of the
code goes away) and there's no problems with memory-leaks.

This new feature is in the CVS. We're integrating it with our products
at the moment and it seems to be working. But of course it's a bit
experimental. It will definitely be stable for the release of Nanning
0.3.

Instead of using explicit remove()-calls it simply uses Javas own
garbage collection.

Is this okay with you?

> -----Original Message-----
> From: [email protected] [mailto:nanning-
> [email protected]] On Behalf Of yiming wang
> Sent: Thursday, April 24, 2003 3:15 AM
> To: [email protected]
> Subject: [Nanning-developer] how to remove OBJECT from
> BasicIdentifyingSystem
> 
> 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
> _______________________________________________
> Nanning-developer mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/nanning-developer



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