geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: Why is PersistenceUnitBuilder.respectExcludeUnlistedClasses(GBeanData gbeanData) for?
Date Fri, 09 Nov 2007 21:42:33 GMT
It's not altogether clear from the spec, but...(IIRC)

- if you set excludeUnlistedClasses in persistence.xml then we're  
supposed to ignore any jar file urls
- if you don't set excludeUnlistedClasses we're supposed to ignore  
any class names you provide and rely completely on scanning all jar  
files listed to find the classes to enhance.

Again IIRC openjpa had some major problems dealing with listed  
classes if you supplied both.

On Nov 9, 2007, at 1:21 PM, Jacek Laskowski wrote:

> Hi,
> I'm still trying to figure out why geronimo refuses seam's jee5 sample
> to deploy and stumbled upon
> org.apache.geronimo.persistence.builder.PersistenceUnitBuilder.respect 
> ExcludeUnlistedClasses(GBeanData
> gbeanData) method.
>     private void respectExcludeUnlistedClasses(GBeanData gbeanData) {
>         boolean excludeUnlistedClasses = (Boolean)
> gbeanData.getAttribute("excludeUnlistedClasses");
>         if (excludeUnlistedClasses) {
>             gbeanData.clearAttribute("jarFileUrls");
>         } else {
>             gbeanData.clearAttribute("managedClassNames");
>         }
>     }
> Why is this for and how could I set the attribute  
> excludeUnlistedClasses?

it's in persistence.xml
> I think I'm missing some Geronimo architectural design lessons so it
> may seem obvious for the most if not all of you, but can't answer it
> myself. If Geronimo starts a gbean, can its attributes be changed at
> runtime?

yes, but if the attributes were supplied in the constructor nothing  
will happen until you restart the gbean.
> Am I allowed to deploy a gbean that's already deployed and
> change its configuration, i.e. deploy a new configuration whereas the
> former's removed.

I don't follow what you mean here.

BTW, is this app using Hibernate rather than OpenJpa?  I don't know  
what might happen from openejb's use of openjpa for cmp 2.1, but you  
might try turning off the openjpa module.  This should prevent the    
openjpa enhancer from getting registered, and if its not registered  
it can't cause trouble :-)  If openejb turns openjpa on again for you  
through dependency relationships you might be able to just turn off  
the openjpa enhancer gbean.

hope this helps
david jencks

> Jacek
> -- 
> Jacek Laskowski

View raw message