Re: Persistence.xml

2020-01-15 Thread Tim Ward
Hi Matthias, What you’re doing in the example code is mostly correct, but by including the datasource configuration in your persistence.xml you are specifying a “complete” persistence unit. This means that an EntityManagerFactory will be created for you automatically with *no* dialect set, to

Re: Persistence.xml

2020-01-14 Thread Matthias Leinweber
Hello Tim, well yes and no. I can create a persistence.xml like: org.eclipse.persistence.jpa.PersistenceProvider osgi:service/javax.sql.DataSource/( osgi.jndi.service.name=bar) osgi:service/javax.sql.DataSource/( osgi.jndi.service.name=bar) my.Class

Re: Persistence.xml

2020-01-14 Thread Tim Ward
Your best option would be to specify an incomplete persistence unit and then use an EntityManagerFactoryBuilder or a configuration admin diction

Persistence.xml

2020-01-14 Thread Matthias Leinweber
Hello Karafers, I am searching for a way to modify a persistance.xml during bundle installation/configuration to select the dialect for the eclipselink/hibernate mapper. What is the best way to make this configurable? best regards

Re: Dynamic parameters in persistence.xml

2015-11-19 Thread conejo
Hello, JB, Christian. This solution is perfect. Thank you very much to you both for the help. -- View this message in context: http://karaf.922171.n3.nabble.com/Dynamic-parameters-in-persistence-xml-tp4043602p4043615.html Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Dynamic parameters in persistence.xml

2015-11-19 Thread Markus Rathgeb
Hi Jean-Baptiste, I think you read yesterday about it (in a abstracted context). ;) That is the same background I am using in: https://issues.apache.org/jira/browse/KARAF-4124

Re: Dynamic parameters in persistence.xml

2015-11-19 Thread Jean-Baptiste Onofré
Good point Christian. However, I understood that the user wanted a "pure" persistence.xml, but if he can use the cfg properties file, clearly it's a better option. Regards JB On 11/19/2015 10:42 AM, Christian Schneider wrote: Hi, this is possible. See https://github.com/ap

Re: Dynamic parameters in persistence.xml

2015-11-19 Thread Christian Schneider
want to override. Christian On 19.11.2015 08:26, conejo wrote: Hello. I have a doubt. Is there any way to make persistence.xml file parameters are dynamic? For example, hibernate.show_sql or hibernate.dialect -- View this message in context: http://karaf.922171.n3.nabble.com/Dynamic

Re: Dynamic parameters in persistence.xml

2015-11-18 Thread Jean-Baptiste Onofré
Hi, not right now, and I don't think it makes sense as it's evaluated when the bundle starts. By the way, I would like to generate the persistence.xml by annotations in karaf-boot. Regards JB On 11/19/2015 08:26 AM, conejo wrote: Hello. I have a doubt. Is there any w

Dynamic parameters in persistence.xml

2015-11-18 Thread conejo
Hello. I have a doubt. Is there any way to make persistence.xml file parameters are dynamic? For example, hibernate.show_sql or hibernate.dialect -- View this message in context: http://karaf.922171.n3.nabble.com/Dynamic-parameters-in-persistence-xml-tp4043602.html Sent from the Karaf - User