1 Reply Latest reply: Aug 13, 2013 10:59 AM by Nachi RSS

    How to invoke save on MBean ADFConnection

    Nachi

      Hello,

       

      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.

       

      Thanks,

      Nachiket

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

          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)

          try:

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

          except WLSTException:

              print 'error'