Your example it's works ,but my problemis with jpa:context in this case the
property is not resolved
<jpa:context property="entityManager" unitname="${unitname}" />
From: [email protected]
To: [email protected]
Subject: RE: jpa:context not evaluating property define in cm-propert
Date: Mon, 29 Jul 2013 09:41:08 +0000
Right,
I never tested it with 3.0.0-SNAPSHOT, but this is the way it works here on
Karaf 2.3.1
../karaf/etc/com.yourproperties.cfg
à
unitname =test1
<cm:default-properties>
<cm:property name="unitname" value="" />
</cm:default-properties>
<bean
id="mananger"
class="com.yourmanager.Manager"
init-method="init">
<property
name=" unitname"
value="${unitname}"/>
</bean>
From: Sébastien Nicouleau [mailto:[email protected]]
Sent: 29 July 2013 10:51
To: [email protected]
Subject: RE: jpa:context not evaluating property define in cm-propert
Hi,
I did this, but in the filter of my service to retrieve the entitymanager I see
unitname $ {unitname}, the value is not replaced.
I use Karaf 3.0.0-SNAPSHOT
Thanks
From:
[email protected]
To: [email protected]
Subject: RE: jpa:context not evaluating property define in cm-propert
Date: Mon, 29 Jul 2013 08:20:39 +0000
Hello
Sébastien,
Add a .cfg file inside your karaf etc dir with the property in it:
../karaf/etc/com.yourproperties.cfg
à
jeet-core-pu=test1test2
left the value in blank
<cm:default-properties>
<cm:property name="unitname" value=" " />
</cm:default-properties>
Change the persistent-id to the same name of the cfg file:
à
persistent-id="com.yourproperties"
Thomas.
From: Sébastien Nicouleau [mailto:[email protected]]
Sent: 27 July 2013 18:00
To: [email protected]
Subject: jpa:context not evaluating property define in cm-propert
Hi,
we want to make the name configurable AdminService unit-name, the problem is
that the namespace jpa: context does not evaluate the property:
<?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:jpa="http://aries.apache.org/xmlns/jpa/v1.0.0"
xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.0.0"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
default-activation="eager">
<cm:property-placeholder persistent-id="domain-party" update-strategy="reload">
<cm:default-properties>
<cm:property name="unitname" value="jeet-core-pu" />
</cm:default-properties>
</cm:property-placeholder>
<bean id="partyRepositoryFactory"
class="com.jeet.domain.base.service.repository.jpa.JeetJpaRepositoryFactoryBean"
init-method="afterPropertiesSet">
<jpa:context property="entityManager" unitname="${unitname}" />
<property name="repositoryInterface"
value="com.jeet.domain.party.service.impl.party.repository.PartyRepository" />
</bean>
</blueprint>
Confidentiality: The contents of this e-mail and any attachments transmitted
with it are intended to be confidential to the intended recipient; and may be
privileged or otherwise protected from disclosure. If you are not an intended
recipient of this e-mail,
do not duplicate or redistribute it by any means. Please delete it and any
attachments and notify the sender that you have received it in error. This
e-mail is sent by a William Hill PLC group company. The William Hill group
companies include, among others,
William Hill PLC (registered number 4212563), William Hill Organization
Limited (registered number 278208), William Hill US HoldCo Inc, WHG
(International) Limited (registered number 99191) and WHG Trading Limited
(registered number 101439). Each of William
Hill PLC, William Hill Organization Limited is registered in England and Wales
and has its registered office at Greenside House, 50 Station Road, Wood Green,
London N22 7TP. William Hill U.S. HoldCo, Inc. is 160 Greentree Drive, Suite
101, Dover 19904, Kent,
Delaware, United States of America. Each of WHG (International) Limited and
WHG Trading Limited is registered in Gibraltar and has its registered office at
6/1 Waterport Place, Gibraltar. Unless specifically indicated otherwise, the
contents of this e-mail
are subject to contract; and are not an official statement, and do not
necessarily represent the views, of William Hill PLC, its subsidiaries or
affiliated companies. Please note that neither William Hill PLC, nor its
subsidiaries and affiliated companies
can accept any responsibility for any viruses contained within this e-mail and
it is your responsibility to scan any emails and their attachments. William
Hill PLC, its subsidiaries and affiliated companies may monitor e-mail traffic
data and also the content
of e-mails for effective operation of the e-mail system, or for security,
purposes..
Confidentiality: The contents of this e-mail and any attachments transmitted
with it are intended to be confidential to the intended recipient; and may be
privileged or otherwise protected from disclosure. If you are not an intended
recipient of this e-mail,
do not duplicate or redistribute it by any means. Please delete it and any
attachments and notify the sender that you have received it in error. This
e-mail is sent by a William Hill PLC group company. The William Hill group
companies include, among others,
William Hill PLC (registered number 4212563), William Hill Organization
Limited (registered number 278208), William Hill US HoldCo Inc, WHG
(International) Limited (registered number 99191) and WHG Trading Limited
(registered number 101439). Each of William
Hill PLC, William Hill Organization Limited is registered in England and Wales
and has its registered office at Greenside House, 50 Station Road, Wood Green,
London N22 7TP. William Hill U.S. HoldCo, Inc. is 160 Greentree Drive, Suite
101, Dover 19904, Kent,
Delaware, United States of America. Each of WHG (International) Limited and
WHG Trading Limited is registered in Gibraltar and has its registered office at
6/1 Waterport Place, Gibraltar. Unless specifically indicated otherwise, the
contents of this e-mail
are subject to contract; and are not an official statement, and do not
necessarily represent the views, of William Hill PLC, its subsidiaries or
affiliated companies. Please note that neither William Hill PLC, nor its
subsidiaries and affiliated companies
can accept any responsibility for any viruses contained within this e-mail and
it is your responsibility to scan any emails and their attachments. William
Hill PLC, its subsidiaries and affiliated companies may monitor e-mail traffic
data and also the content
of e-mails for effective operation of the e-mail system, or for security,
purposes..