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

Jason T. Greene jason.greene at redhat.com
Mon Sep 14 18:47:12 EDT 2009


Stan Silvert wrote:
> Emmanuel Bernard wrote:
>> I've started my migration work in
>> https://svn.jboss.org/repos/jbossas/projects/jpa/trunk/
>>
>> But I need feedback.
>>
>> I am bootstrapping BV for now but it will need integration with the 
>> application level BV. I will take inspiration from the JSF work Stan 
>> has done as soon as it's JNDI issue is solved.
> Resending.  This bounced the first time...
> 
> 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?  If not, 
> will DeploymentUnit.getName() work better as a JNDI subcontext name?

No, getSimpleName() will fail for nested deployments. You could however 
concatenate getRelativePath() with getTopLevel().getSimpleName(). 
Although, this doesn't cover the case of duplicate file names in 
different deploy directories. I'm not sure how well we want to handle 
that case.

getName() will definitely be unique, but will be a fully qualified FS path.

> * What is the status of JNDI requirements in the spec? * Are we required 
> to bind to java://comp/env?

The EE6 requirements refer to namespaces we do not yet support, however 
comp would be an acceptable relative substitution.

-- 
Jason T. Greene
JBoss, a division of Red Hat



More information about the jboss-development mailing list