Results 1 to 3 of 3

Thread: get dataSource properties from the jms header: name="url" value=:headers[url]

  1. #1
    Join Date
    Dec 2011
    Posts
    26

    Default get dataSource properties from the jms header: name="url" value=:headers[url]

    Hi, the idea is read the header of my message each time that i do an jdbc:outbound, jdbctemplate.... and get from the header the properties necessaries for the datasource.
    I would like do something like;

    <bean id="dataSource" class="...">
    <property name="driverClassName" value=:headers[driver]/>
    <property name="url" value=:headers[url]/>
    <property name="username" value=:headers[user]/>
    <property name="password" value=:headers[pass]/>
    </bean>

    but i think it isn't possible, another idea is save the properties in a java class and access to this data from through the sql-parameter-source-factory. Any suggestion?

    Thanks!!

  2. #2
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    Hello

    Next time use code tags

    could you explain detailed your specific requirement?

    I dont understand what do you want to resolve with this *header* approach
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  3. #3
    Join Date
    Dec 2011
    Posts
    26

    Default

    Hi, the message's payload contains data to be inserted in a data base and the information related with the database connection is stored in the header.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •