openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: java.util.concurrent
Date Thu, 01 Jun 2006 15:34:15 GMT
Hi Abe,

First, welcome to the OpenJPA mailing list.
On May 31, 2006, at 6:36 PM, Abe White wrote:

> Hello all --
>
> For those of you who don't know me, my name is Abe White, I'm a BEA  
> employee (by way of SolarMetric), and I expect that I'll be  
> spending most of my time working on OpenJPA once we separate out  
> our proprietary bits and get it off the ground.
>
> As you've been discussing, one of the goals of OpenJPA is that the  
> core be JDK 1.3-compatible.  Another goal, however, is that OpenJPA  
> scale very well.  To that end, I spent a little time recently  
> investigating concurrency in the Kodo codebase.  I've only gone  
> over the "lib" code (basically the stuff that's checked into  
> OpenJPA), but it turns out that with a few of the  
> java.util.concurrent classes, we could get rid of almost all  
> synchronization.  Unfortunately, the java.util.concurrent package  
> is 1.5-only, and even the available backport is 1.4 code (http:// 
> dcl.mathcs.emory.edu/util/backport-util-concurrent/).  The backport  
> is public domain, and it would be trivial to alter the few classes  
> we need (ConcurrentHashMap, CopyOnWriteArrayList,  
> CopyOnWriteArraySet) to be 1.4-compatible and check them in as  
> OpenJPA utils (well actually Kodo utils, but OpenJPA utils when we  
> synch the codebases).  Before I do that, however, I'm wondering if   
> anyone has other suggestions.  Perhaps there is already code out  
> there I don't know about.
>
> p.s. It turns out that a ConcurrentHashMap that could deal with  
> soft/weak references would also be very useful in a couple of  
> places, so if anyone knows of such a beast, speak up.  I haven't  
> investigated the feasibility of making one yet.

The JDO project has a couple of classes that are not highly  
concurrent but use weak references. WeakHashSet and WeakValueHashMap  
are useful for persistent object caches. They are copyright Apache so  
just take them if they are useful.

>
> p.p.s. Not sure if Patrick has mentioned this, but the plan is to  
> use a Sun-like coding style for OpenJPA.  The code currently  
> checked in uses the old SolarMetric style (which has its roots in  
> the style of an even older company).  So I just wanted to assure  
> everyone that we'll switch over to a style more people are probably  
> used to at some point in this migration from the Kodo codebase.  I  
> personally am a nazi about formatting being consistent, so when we  
> do switch, it will be completely.

Consistency is good. I look forward to helping out. By the way, it  
might be good to take a look at the OpenJPA coding guidelines at  
http://incubator.apache.org/openjpa/ which I made up (based on the  
Geronimo standards. The guidelines can be changed to suit our  
project, but please take a look.

Craig

> ______________________________________________________________________ 
> _
> Notice:  This email message, together with any attachments, may  
> contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and   
> affiliated
> entities,  that may be confidential,  proprietary,  copyrighted   
> and/or
> legally privileged, and is intended solely for the use of the  
> individual
> or entity named in this message. If you are not the intended  
> recipient,
> and have received this message in error, please immediately return  
> this
> by email and then delete it.

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Mime
View raw message