Page 3 of 3 FirstFirst 123
Results 21 to 22 of 22

Thread: How to access Spring service in Stateless bean

  1. #21
    Join Date
    Feb 2007
    Posts
    13

    Default Spring Transaction

    Hi Andreas

    Transaction tx = null;
    tx = session.beginTransaction();
    tx.commit();


    For the above code , i manually open and close the transation. How to implement the all the transaction take care by Spring framework.

    kindly provide the sample for the transaction take care Spring.



    Reagrds
    Balakrishnan .

  2. #22
    Join Date
    Feb 2007
    Posts
    13

    Default how to read values from properties file in applicationContext.xml

    Hi

    <property name="environment">
    <props>
    <prop key="java.naming.factory.initial"></prop>
    <prop key="java.naming.provider.url">t3://localhost:7001</prop> </props>
    </property>

    From the above code , I hard coded "t3://localhost:7001" , Incase if I want change the port , I have to change this values.

    My doubt is how to read this values from properties files instead of hardcode values , please anyone help on this.

    regards
    Balakrishnan

Posting Permissions

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