You can observes an event to do that, no need to tune the deployer chain:
BeforeAppInfoBuilderEvent


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-02-24 15:02 GMT+01:00 Svetlin Zarev <[email protected]>:

> I have a DynamicDeployer that creates the Resource objects for the
> datasources and the ConvertDataSourceDefinitions deployer does the (almost)
> same thing, so I want to remove it from the chain
>
> 2017-02-24 15:56 GMT+02:00 Romain Manni-Bucau <[email protected]>:
>
> > Hi
> >
> > what's the actual goal? (= why do you need to extend
> ConfigurationFactory?)
> > Wonder if an event can't solve it if not already there.
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <https://blog-rmannibucau.rhcloud.com> | Old Blog
> > <http://rmannibucau.wordpress.com> | Github <https://github.com/
> > rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
> > <https://javaeefactory-rmannibucau.rhcloud.com>
> >
> > 2017-02-24 14:54 GMT+01:00 Svetlin Zarev <svetlin.angelov.zarev@gmail.
> com
> > >:
> >
> > > Hello,
> > >
> > > I want to subclass the org.apache.openejb.config.ConfigurationFactory
> > > class
> > > in order to customize the deployer chain. Unfortunately the chain is
> > > constructed inside ConfigurationFactory(offline, preAutoConfigDeployer)
> > > constructor, so when I use the ConfigurationFactory(offline,
> > deployerChain,
> > > configuration) constructor I have to copy-paste a huge portion of the
> > code
> > > that initializes the deployer chain. Hence my suggestion: It would be
> > great
> > > if the code that initializes the deployer chain is extracted in a
> > protected
> > > method that initializes the passed Chain -> protected void
> > > initDeployerChain(Chain chain). In that way subclasses can reuse that
> > code
> > > while being able to painlessly add/remove dynamic deployers.
> > >
> > > Kind regards,
> > > Svetlin
> > >
> >
>

Reply via email to