get cmp fields names - Websphere

This is a discussion on get cmp fields names - Websphere ; Hello Yang/other WSAD developers , thanks for the answer , I am using a new pattern , all my EntityBeans have method called db2map() that return map with the content of the CMP fields. Is it possible to get the ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: get cmp fields names

  1. get cmp fields names

    Hello Yang/other WSAD developers , thanks for the answer ,

    I am using a new pattern , all my EntityBeans have method called db2map() that return map with the content of the CMP fields.
    Is it possible to get the CMPs name from the ejb-jar.xml dynamicly? how?
    if not right now we are using entityClass.getMethods()(reflection) and check which method is a getter and have a setter as well , it's not perfect but you never gave us access to the DataCacheEntry...

    Thank you!


  2. Re: get cmp fields names

    Hello,

    Using reflection on method name is problematic , as there can be other
    getter/setter methods defined by user which is not a cmp-field
    getter/setter. I will look into how you can get the CMP field names
    programmatically. Is i tokay if you need to use websphere dependent class to
    retrieve the names?

    Take care.

    Yang.

    "ohadas" wrote in message
    news:580422384.1080809632826.JavaMail.wasadmin@swg 3ws006...
    > Hello Yang/other WSAD developers , thanks for the answer ,
    >
    > I am using a new pattern , all my EntityBeans have method called db2map()

    that return map with the content of the CMP fields.
    > Is it possible to get the CMPs name from the ejb-jar.xml dynamicly? how?
    > if not right now we are using entityClass.getMethods()(reflection) and

    check which method is a getter and have a setter as well , it's not perfect
    but you never gave us access to the DataCacheEntry...
    >
    > Thank you!
    >




+ Reply to Thread