Right I have seen sometimes this autocreation of the resource, my question was more about if TomEE was defining a default resource as well so it don't have to create a new one or as you said it creates a new one each time.
Maybe without knowing you have answered my question :D. Thank you so much. 2014-06-16 14:29 GMT+02:00 Jean-Louis Monteiro <[email protected]>: > I'm sorry Alex, but I don't understand what you mean. > If someone in you application (persistence.xml, @Resource, etc) you need a > datasource and nothing is declared in the tomee.xml file, then TomEE will > give you the default one. > You should see a message like "ADJUSTING ...." > > I probably misunderstood the issue or I can not figure the use case. > > -- > Jean-Louis Monteiro > http://twitter.com/jlouismonteiro > http://www.tomitribe.com > > > On Mon, Jun 16, 2014 at 1:17 PM, Alex Soto <[email protected]> wrote: > > > The problem is that you need an id as DataSource or at least a default > id, > > but in services there is no id by default. > > > > > > 2014-06-16 13:46 GMT+02:00 Jean-Louis Monteiro <[email protected] > >: > > > > > Humm you should but if you ask, I guess that does not work, isn't? > > > Definitely, you should be able to use a datasource without defining > > > anything in the tomee.xml. Then, tomee will use defaults. > > > > > > -- > > > Jean-Louis Monteiro > > > http://twitter.com/jlouismonteiro > > > http://www.tomitribe.com > > > > > > > > > On Mon, Jun 16, 2014 at 12:16 PM, Alex Soto <[email protected]> wrote: > > > > > > > Yes but I cannot do something like this in tomee.xml: > > > > > > > > <tomee/> > > > > > > > > and have there a DataSource defined by default ready to be used. > > > > > > > > I know that I can do something like > > > > > > > > <tomee> > > > > <Resource id="name" type="DataSource"> > > > > JdbcUrl = jdbc:hsqldb:mem:my-ds > > > > </Resource> > > > > </tomee> > > > > > > > > And all the other fields are filled with default parameters. > > > > > > > > > > > > > > > > 2014-06-16 13:06 GMT+02:00 Jean-Louis Monteiro < > > [email protected] > > > >: > > > > > > > > > Yes, service providers are used as templates when creating > resources. > > > > > So yes, look at the service provider for Datasource type. > > > > > > > > > > -- > > > > > Jean-Louis Monteiro > > > > > http://twitter.com/jlouismonteiro > > > > > http://www.tomitribe.com > > > > > > > > > > > > > > > On Mon, Jun 16, 2014 at 11:21 AM, Alex Soto <[email protected]> > > wrote: > > > > > > > > > > > Only one thing I have seen that this is the serviceproviders > > > definition > > > > > but > > > > > > what I meant was as resources. > > > > > > > > > > > > > > > > > > 2014-06-16 12:05 GMT+02:00 Alex Soto <[email protected]>: > > > > > > > > > > > > > Thank you > > > > > > > > > > > > > > > > > > > > > 2014-06-16 12:00 GMT+02:00 Jean-Louis Monteiro < > > > > > [email protected] > > > > > > >: > > > > > > > > > > > > > > Here we are > > > > > > >> > > > > > > >> > > > > > > > > > > > > > > > > > > > > > http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/resources/META-INF/org.apache.openejb/service-jar.xml?view=markup > > > > > > >> > > > > > > >> > > > > > > >> -- > > > > > > >> Jean-Louis Monteiro > > > > > > >> http://twitter.com/jlouismonteiro > > > > > > >> http://www.tomitribe.com > > > > > > >> > > > > > > >> > > > > > > >> On Mon, Jun 16, 2014 at 10:58 AM, Alex Soto < > [email protected]> > > > > > wrote: > > > > > > >> > > > > > > >> > Hi, > > > > > > >> > > > > > > > >> > I remember some time listening I don't remember where, that > > > Apache > > > > > > TomEE > > > > > > >> > comes with a default Datasource definition and JMS Queue and > > > > Topic. > > > > > > But > > > > > > >> I > > > > > > >> > don't remember where nor the values of these definitions. > > > > > > >> > > > > > > > >> > Do you know something about this fact? > > > > > > >> > > > > > > > >> > -- > > > > > > >> > +----------------------------------------------------------+ > > > > > > >> > Alex Soto Bueno > > > > > > >> > www.lordofthejars.com > > > > > > >> > +----------------------------------------------------------+ > > > > > > >> > > > > > > > >> > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > +----------------------------------------------------------+ > > > > > > > Alex Soto Bueno - Computer Engineer > > > > > > > www.lordofthejars.com > > > > > > > +----------------------------------------------------------+ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > +----------------------------------------------------------+ > > > > > > Alex Soto Bueno - Computer Engineer > > > > > > www.lordofthejars.com > > > > > > +----------------------------------------------------------+ > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > +----------------------------------------------------------+ > > > > Alex Soto Bueno - Computer Engineer > > > > www.lordofthejars.com > > > > +----------------------------------------------------------+ > > > > > > > > > > > > > > > -- > > +----------------------------------------------------------+ > > Alex Soto Bueno - Computer Engineer > > www.lordofthejars.com > > +----------------------------------------------------------+ > > > -- +----------------------------------------------------------+ Alex Soto Bueno - Computer Engineer www.lordofthejars.com +----------------------------------------------------------+
