Hi

there are two things:

1. being able to inherit from default to auto configure a declared object
(this is doable using plain new Template API or old service-provider)
2. being able to declare on the fly resources (this requires you to write a
small openejb observer to add resources before they get created. this can
be done observing AssemblerCreated event and overriding openejb.conf.file
to point on your custom tomee.xml you would write in this observer,
alternative is to set system properties for resources using properties
syntax)




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

2016-06-27 14:19 GMT+02:00 Svetlin Zarev <[email protected]>:

> Hello,
>
>
>
> Let’s assume that I have an object: org.example.ExampleObject and a service
> provider: org.example.ExampleObjectProvider
>
> The service provider has a service-jar.xml:
>
>
>
> <ServiceJar>
>     <ServiceProvider id=
> *"Default ExampleObject Provider"                      *service=
> *"Resource"                      *types=
> *"org.example.ExampleObject"                      *class-name=
> *"org.example.ExampleObjectProvider"                      *factory-name=
> *"provide"                      *constructor=*"ServiceId"*>
>     </ServiceProvider>
> </ServiceJar>
>
>
>
> Can I register that service provider to be the *default* service provider
> for ExampleObject objects without having to declare every single
> ExampleObject resource in tome.xml/resource.xml ? In other words – I want
> it to behave exactly like the default service-providers (for instance like
> the javax.sql.DataSource provider) declared in
> org.apache.openejb/service-jar.xml.
>
>
>
> Kind regards,
>
> Svetlin
>

Reply via email to