[jira] [Commented] (ARIES-1355) blueprint-jpa does not interpolate configuration properties
[ https://issues.apache.org/jira/browse/ARIES-1355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16140068#comment-16140068 ] Matt Pavlovich commented on ARIES-1355: --- Following up with more details on this issue: In many cases, we have to drop to native queries specific to database vendor in order to achieve desired performance (looking at you Oracle). Allowing the PU name to be configurable, allows us to have a key to change which native queries to leverage as well. Thanks > blueprint-jpa does not interpolate configuration properties > --- > > Key: ARIES-1355 > URL: https://issues.apache.org/jira/browse/ARIES-1355 > Project: Aries > Issue Type: Bug > Components: Blueprint >Affects Versions: blueprint-cm-1.0.6 >Reporter: Matt Pavlovich > > When attempting to wire in the persistent unit name from a cm property, aries > jpa does not interpolate the value, and instead tries to lookup the ${name} > literally. > {noformat} > > http://www.osgi.org/xmlns/blueprint/v1.0.0; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; > xmlns:camel="http://camel.apache.org/schema/blueprint; > xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0; > xmlns:jpa="http://aries.apache.org/xmlns/jpa/v1.1.0; > xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.1.0; > xsi:schemaLocation=" > http://www.osgi.org/xmlns/blueprint/v1.0.0 > http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd;> > > > > > >destroy-method="destroy"> >property="entityManagerFactory" /> > > .. > {noformat} > Log message > {noformat} > [(&(&(!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory)), > > (&(&(!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory))] > java.util.concurrent.TimeoutException > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (ARIES-1355) blueprint-jpa does not interpolate configuration properties
[ https://issues.apache.org/jira/browse/ARIES-1355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14644101#comment-14644101 ] Giuseppe Gerla commented on ARIES-1355: --- This is not true. To manage all possible combination of vendor + jta/non-jta you have to work on the jndi service registered in osgi. You have only 2 EntityManager, one for JTA and one for non-JTA. If you want change vendor you have to change the configuration of javax.sql.DataSource service. bean id=dataSource class=org.apache.commons.dbcp.BasicDataSource destroy-method=close property name=driverClassName value=${my_db.driverClassName} / property name=url value=${my_db.url} / property name=username value=${my_db.username} / property name=password value=${my_db.password} / /bean Do you agree? blueprint-jpa does not interpolate configuration properties --- Key: ARIES-1355 URL: https://issues.apache.org/jira/browse/ARIES-1355 Project: Aries Issue Type: Bug Components: Blueprint Affects Versions: blueprint-cm-1.0.6 Reporter: Matt Pavlovich When attempting to wire in the persistent unit name from a cm property, aries jpa does not interpolate the value, and instead tries to lookup the ${name} literally. {noformat} ?xml version=1.0 encoding=UTF-8? blueprint xmlns=http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:camel=http://camel.apache.org/schema/blueprint; xmlns:cm=http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0; xmlns:jpa=http://aries.apache.org/xmlns/jpa/v1.1.0; xmlns:tx=http://aries.apache.org/xmlns/transactions/v1.1.0; xsi:schemaLocation= http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd; cm:property-placeholder persistent-id=com.company.jpatest cm:default-properties cm:property name=persistentUnitName value=my.pu / /cm:default-properties /cm:property-placeholder bean id=tracingStoreTx class=com.company.StuffJPAImpl destroy-method=destroy jpa:unit unitname=${persistentUnitName} property=entityManagerFactory / /bean .. {noformat} Log message {noformat} [(((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory)), (((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory))] java.util.concurrent.TimeoutException {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ARIES-1355) blueprint-jpa does not interpolate configuration properties
[ https://issues.apache.org/jira/browse/ARIES-1355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14644414#comment-14644414 ] Matt Pavlovich commented on ARIES-1355: --- Giuseppe- I agree, that is possible for simple scenarios. However, that generally assumes that the schema is straight forward and managed by the JPA provider. In most cases we work with, that does not meet the requirements. We end up with something that allows us to abstract the column definition variance like this: META-INF/orm-mysql.xml META-INF/orm-mssql.xml META-INF/orm-oracle.xml META-INF/persistence.xml (pu-mysql, pu-mssql, pu-oracle, etc..) For example: * MS SQL requires different column definitions for identity to use Sequence Objects vs MySQL which has AUTO_INCREMENT * Date time column definitions vary across vendors for date precision * Same for DOUBLE, XML, BLOB/CLOB and other column types requiring specific precision * etc. blueprint-jpa does not interpolate configuration properties --- Key: ARIES-1355 URL: https://issues.apache.org/jira/browse/ARIES-1355 Project: Aries Issue Type: Bug Components: Blueprint Affects Versions: blueprint-cm-1.0.6 Reporter: Matt Pavlovich When attempting to wire in the persistent unit name from a cm property, aries jpa does not interpolate the value, and instead tries to lookup the ${name} literally. {noformat} ?xml version=1.0 encoding=UTF-8? blueprint xmlns=http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:camel=http://camel.apache.org/schema/blueprint; xmlns:cm=http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0; xmlns:jpa=http://aries.apache.org/xmlns/jpa/v1.1.0; xmlns:tx=http://aries.apache.org/xmlns/transactions/v1.1.0; xsi:schemaLocation= http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd; cm:property-placeholder persistent-id=com.company.jpatest cm:default-properties cm:property name=persistentUnitName value=my.pu / /cm:default-properties /cm:property-placeholder bean id=tracingStoreTx class=com.company.StuffJPAImpl destroy-method=destroy jpa:unit unitname=${persistentUnitName} property=entityManagerFactory / /bean .. {noformat} Log message {noformat} [(((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory)), (((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory))] java.util.concurrent.TimeoutException {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ARIES-1355) blueprint-jpa does not interpolate configuration properties
[ https://issues.apache.org/jira/browse/ARIES-1355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14642693#comment-14642693 ] Giuseppe Gerla commented on ARIES-1355: --- Hi Matt now I understand the real use case: you want switch between JTA and RESOURCE_LOCAL persistence configuration. In this case you MUST define 2 PUs and JPA doesn't support the PU parametric name. A possible solution is to define a class like following: @PersistenceContext(unitName = pu.osgi.jta) private EntityManager emJta; @PersistenceContext(unitName = pu.osgi) private EntityManager em; private String emToUse; public aries1355(String emToUse) { this.emToUse = emToUse; } public EntityManager getEmActive() { if(pu.osgi.jta.equals(emToUse)) { return emJta; } else { return em; } } and you can set emToUSe by configuration parameter. I hope this can help you. blueprint-jpa does not interpolate configuration properties --- Key: ARIES-1355 URL: https://issues.apache.org/jira/browse/ARIES-1355 Project: Aries Issue Type: Bug Components: Blueprint Affects Versions: blueprint-cm-1.0.6 Reporter: Matt Pavlovich When attempting to wire in the persistent unit name from a cm property, aries jpa does not interpolate the value, and instead tries to lookup the ${name} literally. {noformat} ?xml version=1.0 encoding=UTF-8? blueprint xmlns=http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:camel=http://camel.apache.org/schema/blueprint; xmlns:cm=http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0; xmlns:jpa=http://aries.apache.org/xmlns/jpa/v1.1.0; xmlns:tx=http://aries.apache.org/xmlns/transactions/v1.1.0; xsi:schemaLocation= http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd; cm:property-placeholder persistent-id=com.company.jpatest cm:default-properties cm:property name=persistentUnitName value=my.pu / /cm:default-properties /cm:property-placeholder bean id=tracingStoreTx class=com.company.StuffJPAImpl destroy-method=destroy jpa:unit unitname=${persistentUnitName} property=entityManagerFactory / /bean .. {noformat} Log message {noformat} [(((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory)), (((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory))] java.util.concurrent.TimeoutException {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ARIES-1355) blueprint-jpa does not interpolate configuration properties
[ https://issues.apache.org/jira/browse/ARIES-1355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14643609#comment-14643609 ] Matt Pavlovich commented on ARIES-1355: --- Giuseppe: That isn't a real viable option, b/c then the code needs to handle all possible combinations of vendor + jta/non-jta mysql, mysql+jta, mssql, mssql+jta, h2sql, etc Is there another reason to EOL the blueprint jpa support and not support config interpolation? blueprint-jpa does not interpolate configuration properties --- Key: ARIES-1355 URL: https://issues.apache.org/jira/browse/ARIES-1355 Project: Aries Issue Type: Bug Components: Blueprint Affects Versions: blueprint-cm-1.0.6 Reporter: Matt Pavlovich When attempting to wire in the persistent unit name from a cm property, aries jpa does not interpolate the value, and instead tries to lookup the ${name} literally. {noformat} ?xml version=1.0 encoding=UTF-8? blueprint xmlns=http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:camel=http://camel.apache.org/schema/blueprint; xmlns:cm=http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0; xmlns:jpa=http://aries.apache.org/xmlns/jpa/v1.1.0; xmlns:tx=http://aries.apache.org/xmlns/transactions/v1.1.0; xsi:schemaLocation= http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd; cm:property-placeholder persistent-id=com.company.jpatest cm:default-properties cm:property name=persistentUnitName value=my.pu / /cm:default-properties /cm:property-placeholder bean id=tracingStoreTx class=com.company.StuffJPAImpl destroy-method=destroy jpa:unit unitname=${persistentUnitName} property=entityManagerFactory / /bean .. {noformat} Log message {noformat} [(((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory)), (((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory))] java.util.concurrent.TimeoutException {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ARIES-1355) blueprint-jpa does not interpolate configuration properties
[ https://issues.apache.org/jira/browse/ARIES-1355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14642086#comment-14642086 ] Matt Pavlovich commented on ARIES-1355: --- The main use case is to be able to support JTA and non-JTA data sources from the same bundle. I don't believe that those values can be simply injected using the Properties map.. see below: PU #1: {noformat} persistence-unit name=pu.osgi.jta transaction-type=JTA providerorg.apache.openjpa.persistence.PersistenceProviderImpl/provider jta-data-sourceosgi:service/javax.sql.DataSource/(osgi.jndi.service.name=jndi/ds.jta)/jta-data-source mapping-fileMETA-INF/orm.xml/mapping-file classcom.company.ClassToBeEnhanced/class exclude-unlisted-classestrue/exclude-unlisted-classes properties property name=openjpa.TransactionMode value=managed / property name=org.apache.openjpa.ManagedRuntime value=jndi(TransactionManagerName=osgi:service/javax.transaction.TransactionManager) / /properties /persistence-unit {noformat} PU #2: {noformat} persistence-unit name=pu.osgi transaction-type=RESOURCE_LOCAL providerorg.apache.openjpa.persistence.PersistenceProviderImpl/provider non-jta-data-sourceosgi:service/javax.sql.DataSource/(osgi.jndi.service.name=jndi/ds)/non-jta-data-source mapping-fileMETA-INF/orm.xml/mapping-file classcom.company.ClassToBeEnhanced/class exclude-unlisted-classestrue/exclude-unlisted-classes properties /properties /persistence-unit {noformat} blueprint-jpa does not interpolate configuration properties --- Key: ARIES-1355 URL: https://issues.apache.org/jira/browse/ARIES-1355 Project: Aries Issue Type: Bug Components: Blueprint Affects Versions: blueprint-cm-1.0.6 Reporter: Matt Pavlovich When attempting to wire in the persistent unit name from a cm property, aries jpa does not interpolate the value, and instead tries to lookup the ${name} literally. {noformat} ?xml version=1.0 encoding=UTF-8? blueprint xmlns=http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:camel=http://camel.apache.org/schema/blueprint; xmlns:cm=http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0; xmlns:jpa=http://aries.apache.org/xmlns/jpa/v1.1.0; xmlns:tx=http://aries.apache.org/xmlns/transactions/v1.1.0; xsi:schemaLocation= http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd; cm:property-placeholder persistent-id=com.company.jpatest cm:default-properties cm:property name=persistentUnitName value=my.pu / /cm:default-properties /cm:property-placeholder bean id=tracingStoreTx class=com.company.StuffJPAImpl destroy-method=destroy jpa:unit unitname=${persistentUnitName} property=entityManagerFactory / /bean .. {noformat} Log message {noformat} [(((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory)), (((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory))] java.util.concurrent.TimeoutException {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ARIES-1355) blueprint-jpa does not interpolate configuration properties
[ https://issues.apache.org/jira/browse/ARIES-1355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14642089#comment-14642089 ] Matt Pavlovich commented on ARIES-1355: --- On a related note, we do find having a blueprint-based jpa option handy as it allows to separate the wiring from the code. Is there a reason the blueprint-based capability is being dropped? blueprint-jpa does not interpolate configuration properties --- Key: ARIES-1355 URL: https://issues.apache.org/jira/browse/ARIES-1355 Project: Aries Issue Type: Bug Components: Blueprint Affects Versions: blueprint-cm-1.0.6 Reporter: Matt Pavlovich When attempting to wire in the persistent unit name from a cm property, aries jpa does not interpolate the value, and instead tries to lookup the ${name} literally. {noformat} ?xml version=1.0 encoding=UTF-8? blueprint xmlns=http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:camel=http://camel.apache.org/schema/blueprint; xmlns:cm=http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0; xmlns:jpa=http://aries.apache.org/xmlns/jpa/v1.1.0; xmlns:tx=http://aries.apache.org/xmlns/transactions/v1.1.0; xsi:schemaLocation= http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd; cm:property-placeholder persistent-id=com.company.jpatest cm:default-properties cm:property name=persistentUnitName value=my.pu / /cm:default-properties /cm:property-placeholder bean id=tracingStoreTx class=com.company.StuffJPAImpl destroy-method=destroy jpa:unit unitname=${persistentUnitName} property=entityManagerFactory / /bean .. {noformat} Log message {noformat} [(((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory)), (((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory))] java.util.concurrent.TimeoutException {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ARIES-1355) blueprint-jpa does not interpolate configuration properties
[ https://issues.apache.org/jira/browse/ARIES-1355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14641442#comment-14641442 ] Giuseppe Gerla commented on ARIES-1355: --- what we are trying to explain is that with JPA 2 you have a lot of flexibility, so I'm sure you can meet your use case with an example made in JPA2. Could you send us a sample of code and configuration of your use case with many PU and how you would like to exchange between them? blueprint-jpa does not interpolate configuration properties --- Key: ARIES-1355 URL: https://issues.apache.org/jira/browse/ARIES-1355 Project: Aries Issue Type: Bug Components: Blueprint Affects Versions: blueprint-cm-1.0.6 Reporter: Matt Pavlovich When attempting to wire in the persistent unit name from a cm property, aries jpa does not interpolate the value, and instead tries to lookup the ${name} literally. {noformat} ?xml version=1.0 encoding=UTF-8? blueprint xmlns=http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:camel=http://camel.apache.org/schema/blueprint; xmlns:cm=http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0; xmlns:jpa=http://aries.apache.org/xmlns/jpa/v1.1.0; xmlns:tx=http://aries.apache.org/xmlns/transactions/v1.1.0; xsi:schemaLocation= http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd; cm:property-placeholder persistent-id=com.company.jpatest cm:default-properties cm:property name=persistentUnitName value=my.pu / /cm:default-properties /cm:property-placeholder bean id=tracingStoreTx class=com.company.StuffJPAImpl destroy-method=destroy jpa:unit unitname=${persistentUnitName} property=entityManagerFactory / /bean .. {noformat} Log message {noformat} [(((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory)), (((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory))] java.util.concurrent.TimeoutException {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ARIES-1355) blueprint-jpa does not interpolate configuration properties
[ https://issues.apache.org/jira/browse/ARIES-1355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14640501#comment-14640501 ] Giuseppe Gerla commented on ARIES-1355: --- Hi Matt Christian is right. If your porpouse is to use the same JPA implementation with different databases vendor, you have to work with DataSource configuration. In JPA 2 we implement also the functionality to set persistence properties using ConfigAdmin OSGi service. Using this functionality you can change the JPA implementation without change your code. So, for example, if you set the unit name to my.pu using annotation, then you can pass persistence properties declaring: 1. a PID called org.apache.aries.jpa.my.pu 2. eclipselink property org.apache.aries.jpa.my.pu.eclipselink.ddl-generation = create-tables or hibernate property org.apache.aries.jpa.my.pu.hibernate.hbm2ddl.auto = create-drop If you use Karaf/ServiceMix you have to create a file called org.apache.aries.jpa.my.pu.cfg with following rows for eclipselink eclipselink.ddl-generation = create-tables or following for hibernate hibernate.hbm2ddl.auto = create-drop blueprint-jpa does not interpolate configuration properties --- Key: ARIES-1355 URL: https://issues.apache.org/jira/browse/ARIES-1355 Project: Aries Issue Type: Bug Components: Blueprint Affects Versions: blueprint-cm-1.0.6 Reporter: Matt Pavlovich When attempting to wire in the persistent unit name from a cm property, aries jpa does not interpolate the value, and instead tries to lookup the ${name} literally. {noformat} ?xml version=1.0 encoding=UTF-8? blueprint xmlns=http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:camel=http://camel.apache.org/schema/blueprint; xmlns:cm=http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0; xmlns:jpa=http://aries.apache.org/xmlns/jpa/v1.1.0; xmlns:tx=http://aries.apache.org/xmlns/transactions/v1.1.0; xsi:schemaLocation= http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd; cm:property-placeholder persistent-id=com.company.jpatest cm:default-properties cm:property name=persistentUnitName value=my.pu / /cm:default-properties /cm:property-placeholder bean id=tracingStoreTx class=com.company.StuffJPAImpl destroy-method=destroy jpa:unit unitname=${persistentUnitName} property=entityManagerFactory / /bean .. {noformat} Log message {noformat} [(((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory)), (((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory))] java.util.concurrent.TimeoutException {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ARIES-1355) blueprint-jpa does not interpolate configuration properties
[ https://issues.apache.org/jira/browse/ARIES-1355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14640735#comment-14640735 ] Matt Pavlovich commented on ARIES-1355: --- Yep, we are using the data source approach. The catch is in the dictionary definitions and vendor-specific column mappings. Auto-creating the ddl's is not always an option (or preferred) by many large enterprises. There is always the scenario where you need a different definition to handle things like id columns, date formatters, field precision, clobs, etc. (especially when trying to support MSSQL vs Oracle, etc) This can all be abstracted really easily with a different PU definition, but just requires the ability to have a configurable PU name. blueprint-jpa does not interpolate configuration properties --- Key: ARIES-1355 URL: https://issues.apache.org/jira/browse/ARIES-1355 Project: Aries Issue Type: Bug Components: Blueprint Affects Versions: blueprint-cm-1.0.6 Reporter: Matt Pavlovich When attempting to wire in the persistent unit name from a cm property, aries jpa does not interpolate the value, and instead tries to lookup the ${name} literally. {noformat} ?xml version=1.0 encoding=UTF-8? blueprint xmlns=http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:camel=http://camel.apache.org/schema/blueprint; xmlns:cm=http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0; xmlns:jpa=http://aries.apache.org/xmlns/jpa/v1.1.0; xmlns:tx=http://aries.apache.org/xmlns/transactions/v1.1.0; xsi:schemaLocation= http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd; cm:property-placeholder persistent-id=com.company.jpatest cm:default-properties cm:property name=persistentUnitName value=my.pu / /cm:default-properties /cm:property-placeholder bean id=tracingStoreTx class=com.company.StuffJPAImpl destroy-method=destroy jpa:unit unitname=${persistentUnitName} property=entityManagerFactory / /bean .. {noformat} Log message {noformat} [(((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory)), (((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory))] java.util.concurrent.TimeoutException {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ARIES-1355) blueprint-jpa does not interpolate configuration properties
[ https://issues.apache.org/jira/browse/ARIES-1355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14640428#comment-14640428 ] Christian Schneider commented on ARIES-1355: Hi Matt, the main reason for the annotation based approach is to use a standards based approach instead of an aries specific one. It will also make it easier to port code from JEE to blueprint and vice a versa. Can you explain in more detail how you plan use the different persistence units? You can already refer to a DataSource using the jta-datasource element. This allows to switcht the database without touching the code. Aries JPA 2 also allows to supply the persistence properties from a config admin config. That might be another thing that could help. I know that [~ggerla] is using this to test with different persistence providers and I think also DBs. blueprint-jpa does not interpolate configuration properties --- Key: ARIES-1355 URL: https://issues.apache.org/jira/browse/ARIES-1355 Project: Aries Issue Type: Bug Components: Blueprint Affects Versions: blueprint-cm-1.0.6 Reporter: Matt Pavlovich When attempting to wire in the persistent unit name from a cm property, aries jpa does not interpolate the value, and instead tries to lookup the ${name} literally. {noformat} ?xml version=1.0 encoding=UTF-8? blueprint xmlns=http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:camel=http://camel.apache.org/schema/blueprint; xmlns:cm=http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0; xmlns:jpa=http://aries.apache.org/xmlns/jpa/v1.1.0; xmlns:tx=http://aries.apache.org/xmlns/transactions/v1.1.0; xsi:schemaLocation= http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd; cm:property-placeholder persistent-id=com.company.jpatest cm:default-properties cm:property name=persistentUnitName value=my.pu / /cm:default-properties /cm:property-placeholder bean id=tracingStoreTx class=com.company.StuffJPAImpl destroy-method=destroy jpa:unit unitname=${persistentUnitName} property=entityManagerFactory / /bean .. {noformat} Log message {noformat} [(((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory)), (((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory))] java.util.concurrent.TimeoutException {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ARIES-1355) blueprint-jpa does not interpolate configuration properties
[ https://issues.apache.org/jira/browse/ARIES-1355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14638909#comment-14638909 ] Matt Pavlovich commented on ARIES-1355: --- Christian- Thanks for the quick response. The driving factor to allow for multiple persistence units is to readily support variances between DB vendors. Having it be configurable provides even greater flexibility (no need to have separate modules). Off the top of my head, I don't see how an annotation would be able to support that scenario. Are there other factors driving the move away from the blueprint-defined jpa:unit/context? I'm not tied to any particular solution, but having configurable PU's would be a very useful capability. Thanks blueprint-jpa does not interpolate configuration properties --- Key: ARIES-1355 URL: https://issues.apache.org/jira/browse/ARIES-1355 Project: Aries Issue Type: Bug Components: Blueprint Affects Versions: blueprint-cm-1.0.6 Reporter: Matt Pavlovich When attempting to wire in the persistent unit name from a cm property, aries jpa does not interpolate the value, and instead tries to lookup the ${name} literally. {noformat} ?xml version=1.0 encoding=UTF-8? blueprint xmlns=http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:camel=http://camel.apache.org/schema/blueprint; xmlns:cm=http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0; xmlns:jpa=http://aries.apache.org/xmlns/jpa/v1.1.0; xmlns:tx=http://aries.apache.org/xmlns/transactions/v1.1.0; xsi:schemaLocation= http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd; cm:property-placeholder persistent-id=com.company.jpatest cm:default-properties cm:property name=persistentUnitName value=my.pu / /cm:default-properties /cm:property-placeholder bean id=tracingStoreTx class=com.company.StuffJPAImpl destroy-method=destroy jpa:unit unitname=${persistentUnitName} property=entityManagerFactory / /bean .. {noformat} Log message {noformat} [(((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory)), (((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory))] java.util.concurrent.TimeoutException {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ARIES-1355) blueprint-jpa does not interpolate configuration properties
[ https://issues.apache.org/jira/browse/ARIES-1355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14638377#comment-14638377 ] Christian Schneider commented on ARIES-1355: As far as I know configuration properties can only be used for bean property values. I am not sure if there are plans to allow property values at other places. I would rather consider that a general issue for blueprint but I am not sure if it is planned to allow properties in additional places. Btw. in aries jpa 2 there is no jpa:unit element anymore. The persistence unit name is set using an annotation only. blueprint-jpa does not interpolate configuration properties --- Key: ARIES-1355 URL: https://issues.apache.org/jira/browse/ARIES-1355 Project: Aries Issue Type: Bug Components: Blueprint Affects Versions: blueprint-cm-1.0.6 Reporter: Matt Pavlovich When attempting to wire in the persistent unit name from a cm property, aries jpa does not interpolate the value, and instead tries to lookup the ${name} literally. {noformat} ?xml version=1.0 encoding=UTF-8? blueprint xmlns=http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:camel=http://camel.apache.org/schema/blueprint; xmlns:cm=http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0; xmlns:jpa=http://aries.apache.org/xmlns/jpa/v1.1.0; xmlns:tx=http://aries.apache.org/xmlns/transactions/v1.1.0; xsi:schemaLocation= http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd; cm:property-placeholder persistent-id=com.company.jpatest cm:default-properties cm:property name=persistentUnitName value=my.pu / /cm:default-properties /cm:property-placeholder bean id=tracingStoreTx class=com.company.StuffJPAImpl destroy-method=destroy jpa:unit unitname=${persistentUnitName} property=entityManagerFactory / /bean .. {noformat} Log message {noformat} [(((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory)), (((!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=${persistentUnitName}))(objectClass=javax.persistence.EntityManagerFactory))] java.util.concurrent.TimeoutException {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)