[hibernate-dev] hibernate.org

2009-04-18 Thread Hardy Ferentschik
Hi,

Are there any news regarding hibernate.org?
What happened? What's going on?

--Hardy

___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] Hibernate EntityManager reusing MC facilities

2009-04-18 Thread Emmanuel Bernard

I have implemented the first part of it (committed in trunk)

The scanning process is now abstracted according to an interface  
similar to the one proposed in this email.
I've retrofitted the existing model into this interface. We're just  
waiting for the implementation on the jboss infra side and we will use  
it when available (using reflection to avoid runtime dependency).


http://opensource.atlassian.com/projects/hibernate/browse/EJB-427
http://opensource.atlassian.com/projects/hibernate/browse/EJB-428

PS: Set> turns out to be a bit annoying to  
use. Maybe we should use varargs and lose some of the type safety?



On  Mar 28, 2009, at 03:19, Emmanuel Bernard wrote:

I have been chatting with Ales and here is the contract that HEM  
could rely on to scan entities and DD files.


Context:
An EntityManagerFactory (EMF) is bootstrapped by the container by  
passing a PersistenceUnitInfo class

http://anonsvn.jboss.org/repos/hibernate/jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceUnitInfo.java

Which gives:
- the root URL of the PU
- the mapping files
- the URLs of the jars to scan

The container will also pass the MC discovery contract  
implementation in the contextual Map.
If this impl is available in the Map, HEM will go use the MC  
facilities, if not, it will rely on it's own legacy infrastructure.


Here is a proposal for the contract

/**
* return all packages in the jar matching one of these annotations
* if annotationsToLookFor is empty, return all packages
*/
Set getPackagesInJar(URL jartoScan, List  
annotationsToLookFor);


/**
* return all classes in the jar matching one of these annotations
* if annotationsToLookFor is empty, return all classes
*/
Set> getClassesInJar(URL jartoScan, List  
annotationsToLookFor);


/**
* return all files in the jar matching one of these file names
* if filePatterns is empty, return all files
* eg **/*.hbm.xml, META-INF/orm.xml
*/
Set<[structure containing file name + InputStream]>  
getFilesInJar(URL jartoScan, List filePatterns);


Optional contract but would be nice to have:

/**
* return all files in the classpath (ie PU visibility) matching one  
of these file names

* if filePatterns is empty, return all files
* the use case is really exact file name.
*/
Set<[structure containing file name + InputStream]>  
getFilesInClasspath(URL jartoScan, List filePatterns);


/** return the unqualified JAR name ie customer-model.jar or  
store.war */

String getUnqualifiedJarName(URL);



___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev