Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Spring
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Tim Cooke
Campbell Ritchie
paul wheaton
Jeanne Boyarsky
Ron McLeod
Sheriffs:
Paul Clapham
Devaka Cooray
Saloon Keepers:
Tim Holloway
Carey Brown
Piet Souris
Bartenders:
Forum:
Spring
Problem with PropertyPlaceholderConfigurer
Anand Loni
Ranch Hand
Posts: 150
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
PropertyPlaceholderConfigurer is not able to read properties with '/' in it.
Here is my code:
<bean id="projectPropertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <value>classpath*:weblogic.properties</value> </property> </bean> <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate"> <property name="environment"> <props> <prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory </prop> <prop key="java.naming.provider.url">${providerURL}</prop> </props> </property> </bean> <bean id="topicConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean" > <property name="jndiTemplate"> <ref bean="jndiTemplate" /> </property> <property name="jndiName"> <value>${jms.ConnectionFactory}</value> </property> </bean>
here is properties file contents:
providerURL="t3://localhost:7001" jms.ConnectionFactory="jms/confactory"
Other properties are read properly. Any Idea about the issue ?
I am using Spring 3.0.0.
Regards,
~ Anand,
SCJP 1.5, SCWCD 1.5
Anand Loni
Ranch Hand
Posts: 150
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Issue is now resolved..
Problem was " in the properties file.
Thanks
~ Anand,
SCJP 1.5, SCWCD 1.5
Naveen puttu
Ranch Hand
Posts: 88
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
This doesnt work for me . Anything that i might have missed
<!-- Externalize various parameters --> <bean id="projectPropertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <value>classpath*:jms.properties</value> </property> </bean> <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate" lazy-init="true"> <property name="environment"> <props> <prop key="java.naming.factory.initial"> org.jnp.interfaces.NamingContextFactory </prop> <prop key="java.naming.provider.url"> ${providerUrl} </prop> <prop key="java.naming.factory.url.pkgs"> org.jnp.interfaces:org.jboss.naming </prop> </props> </property> </bean> <!-- Configuration for topic location --> <bean id="sendDestination" class="org.springframework.jndi.JndiObjectFactoryBean" lazy-init="true" depends-on="jndiTemplate"> <property name="jndiTemplate"> <ref bean="jndiTemplate"/> </property> <property name="jndiName"> <value>"${queue.jndi.name}"</value> </property> </bean>
here is the properties file entry
queue.jndi.name=queue/partnerOrderNotification providerUrl=jnp://naveen.ketera.com:1199
It just picks queue from queue/partnerOrderNotification
Please help me out . This is killing me
Cheers
naveen
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Jboss NameNotFoundException
Obtaining Datasource in Websphere
Jboss NameNotFoundException
Spring configuration for Testing JMS using Junit
PropertyPlaceholderConfigurer with / and // in the properties file
More...