Announcement Announcement Module
Collapse
No announcement yet.
Using Spring session instead of XML? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using Spring session instead of XML?

    Hi all

    I have an application which reads in a XML file to get the DB URL, username and password etc.

    What I want is for those details to be passed in as inputs and then to set the details into a Spring session if thats possible?

  • #2
    What do you mean by Spring session? For externalization, you can use the PropertyPlaceholderConfigurer class (or its variants - see the reference + javadoc).

    Comment


    • #3
      Rather than using a XML file it would be preferred (if this is possible) if the DB URL, username and password could be passed into the application then these details set against a Spring object.

      Currently I have a XML which contains the DB related parameters:

      ApplicationContext ac = new ClassPathXmlApplicationContext("spring-jdbc.xml", Test.class);

      Comment


      • #4
        Do you mean to say you wants to create sessionFactory(hibernate) dynamically ?
        What do you mean by Spring session?

        Comment

        Working...
        X