regarding cmp fields


EJB programming & troubleshooting: regarding cmp fields

  1. regarding cmp fields (6 messages)

    can we have getter and setter in an entity bean without having corresponding cmp field in ejb-jar.xml.

    Threaded Messages (6)

  2. YUP[ Go to top ]

    But not the other way around
  3. YUP[ Go to top ]

    but i have a different problem. i have gettter n setter for a field wcich is not defined in the ejb-jar.xml. but the field is used in that possible.....
    plz provide the sol.
  4. YUP[ Go to top ]

    Are you using CMR.
    But still AM unable to visualize the circumstance you do not want to declare it in ejb-jar.xml
  5. yes[ Go to top ]

    yes i dont want to define that field in ejb-jar.xml but i want to use that field in CMR.......
    is it possible....
  6. OK I got your intention[ Go to top ]

    Technically every field which participates in relationship need to have a way to access it otherwise there is no way the container can access.

    You do not want client tier to modify the values of the field I suppose.
    If yes
    Then you can change the security level to access the method. Only getter. protected gettter/setter

    If no let me know how you solved the problem
  7. thanks[ Go to top ]

    thnks dear
    i got my ans.....
    actually i got question i m having an Ejb which having some cmp fields....but one field i want to use as cmr field in relationships.......i dont want to define this field as cmp field........i just want to define this as a cmr field in ejb-jar.xml.....

    and the ans is i can do this.........

    any thanks very much..