Announcement Announcement Module
Collapse
No announcement yet.
setting a static variable value Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • setting a static variable value

    Hi,

    I have a static variable(part of leagacy) that i need to populate with a value

    when the bean is getting deployed at appl. startup.the bean is a singleton

    I am not able to set the value ..it is throwing exception..

    Hw can we overcome this?

    regards

  • #2
    I am getting the exception..

    org.springframework.beans.NotWritablePropertyExcep tion: Invalid property 'PropertyName' of bean class....

    Comment


    • #3
      Have you defined setPropertyName() method ?
      http://forum.springframework.org/showthread.php?t=31718

      Comment


      • #4
        yes...i did define the setxxx method...

        Comment


        • #5
          Can you post your code, please ?

          Comment


          • #6
            Have you had a look at this?
            http://www.springframework.org/docs/...-factory-class
            Last edited by karldmoore; Aug 27th, 2007, 04:22 PM.

            Comment


            • #7
              Originally posted by Andrei Stefan View Post
              Can you post your code, please ?

              I couldnt show u the exact code .....but this is the snapshot of the code...

              Object is the actual class .....

              public class Sample{

              public static Object obj;

              static{
              obj=new Object();

              }
              Sample(){
              }

              methods(){
              obj.xxx();
              }
              }

              Comment


              • #8
                Did you have a look at the reference manual link?
                Last edited by karldmoore; Aug 27th, 2007, 04:22 PM.

                Comment


                • #9
                  Couldnt make much of it..

                  Comment

                  Working...
                  X