[jboss-dev] JPA 2 / Hibernate 3.5 in AS 5.2

Ales Justin ales.justin at gmail.com
Tue Sep 15 02:40:50 EDT 2009

> I'll probably have a rough cut checked in by tomorrow.  As of now, for 
> each deployment, it binds a BV Factory in global JNDI at:
> /BeanValidationFactories/<DeploymentUnit.getSimpleName()>/
> Some questions I have:
> * Is DeploymentUnit.getSimpleName() guaranteed to be unique?  

No, unless DU is always top deployment.
And even then it could come from two diff "deploy/" dirs.


or for non top level


> If not, will DeploymentUnit.getName() work better as a JNDI subcontext name?

It will be unique, as it usually equals to URI.toString.
But this is human-unreadable.

Perhaps we could grab all simple names until parent is null, and make
sub-contexts out of them.
Unfortunately, to make this unique, we would have to grab "deploy/" dir
as well,
which is impl/config detail --> not user friendly.

More information about the jboss-development mailing list