On Mon, Apr 25, 2011 at 1:06 AM, Romain Manni-Bucau
<[email protected]>wrote:
> Hi Shawn,
>
> this is probably not enough.
>
> The validator factory is needed in servlet context attributes. In this
> patch
> it is done by looking up an object in the internal openejb jndi tree (cf
> TomcatWebAppBuilder)
>
IMHO, It's OK for geronimo as well as openejb. Firstly, the logic is the
same when openejb is not working in geronimo. Secondly, when openejb is
working within geronimo, Geronimo has it own webapp builder and geronimo
BV won't need that servlet bv attribute to work.
> Same thing in the JndiEncBuilder is done to bind to java:comp/XXXX the
> validator and the factory.
>
See following code, when working within geronimo, JndiEncBuilder will bypass
the whole binding process.
org.apache.openejb.assembler.classic.JndiEncBuilder.build(JndiScope) {
JndiFactory jndiFactory =
SystemInstance.get().getComponent(JndiFactory.class);
if (SystemInstance.get().hasProperty("*openejb.geronimo*")) {
return jndiFactory.createComponentContext(new HashMap());
}
.....
}
>
> I don't know how it is done in the geronimo plugin but IMHO if it is bound
> by the gplugin you should bypass these three bindings.
>
> - Romain
>
>
> 2011/4/24 Shawn Jiang <[email protected]>
>
> > Hi Devs,
> >
> > Recent changes in OPENEJB-1352 brought many geronimo tck regression.
> > Because geronimo has its own BV handling logic, I attached a patch to
> > bypass the openejb BV processing code when openejb is working in
> geronimo.
> > Could you please review and commit it ?
> >
> >
> > ---------- Forwarded message ----------
> > From: Shawn Jiang (JIRA) <[email protected]>
> > Date: Sun, Apr 24, 2011 at 9:45 PM
> > Subject: [jira] [Updated] (OPENEJB-1352) Validator injection
> > To: [email protected]
> >
> >
> >
> > [
> >
> >
> https://issues.apache.org/jira/browse/OPENEJB-1352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> > ]
> >
> > Shawn Jiang updated OPENEJB-1352:
> > ---------------------------------
> >
> > Attachment: 0001-OPENEJB-1352-geronimo-will-handle-BV-by-itself.patch
> >
> > bypass the bv scan actions when openejb is working in geronimo.
> >
> > > Validator injection
> > > -------------------
> > >
> > > Key: OPENEJB-1352
> > > URL:
> https://issues.apache.org/jira/browse/OPENEJB-1352
> > > Project: OpenEJB
> > > Issue Type: Sub-task
> > > Affects Versions: (trunk/openejb3)
> > > Reporter: Jean-Louis MONTEIRO
> > > Assignee: Jean-Louis MONTEIRO
> > > Fix For: 4.0
> > >
> > > Attachments:
> > 0001-OPENEJB-1352-geronimo-will-handle-BV-by-itself.patch,
> > OPENEJB-1352.patch, bean-validation-3.2.x.patch,
> > bean-validation-4.0.0-r1094584.patch,
> bean-validation-4.0.0-r1094584.patch,
> > bean-validation-4.0.0-r1094584.patch, bean-validation-to-complete.path,
> > bean-validation-to-test.path, bean-validation-without-proxy.patch,
> > bean-validation-without-proxy.patch, uniqueId-3.2.x.patch,
> > uniqueId-3.2.x.patch
> > >
> > >
> > > Allow Validator to be injected in Java EE components
> > > @Resource Validator validator (See ValidatorFactory)
> >
> > --
> > This message is automatically generated by JIRA.
> > For more information on JIRA, see:
> http://www.atlassian.com/software/jira
> >
> >
> >
> > --
> > Shawn
> >
>
--
Shawn