1 Reply Latest reply on Aug 13, 2013 3:59 PM by Nachi

    How to invoke save on MBean ADFConnection




      I have a query, through wlst how do I invoke a save operation on the ADFConnection MBean?

      MBean Information : oracle.adf.share.connections:Location=WC_CustomPortal_1,ApplicationVersion=V2.0,beantype=Runtime,name=ADFConnections,Application=MyApplication,ApplicationName=MyApp,type=ADFConnections


      I have a wlst script that will modify an existing connection. At the end of the modification I need to invoke a save.


      Thanks in advance.




        • 1. Re: How to invoke save on MBean ADFConnection

          Answering my own question!


          The following lines of code helped me out


          objname= ObjectName('oracle.adf.share.connections:Location=WC_CustomPortal_1,ApplicationVersion=V2.0,beantype=Runtime,name=ADFConnections,Application=MyApplication,ApplicationName=MyApp,type=ADFConnections')

          mbset = mbs.queryNames(objname,None)

          mbarray= mbset.toArray()

          #the array should have one value in it. Else add a loop into the array and check for the mbean object.

          mbeanObject = mbarray[i]

          objs = jarray.array([], java.lang.Object)

          strs = jarray.array([], java.lang.String)


              connObjName = mbs.invoke(mbeanObject, 'save', objs, strs)

          except WLSTException:

              print 'error'