This discussion is archived
1 Reply Latest reply: Mar 2, 2013 8:15 PM by benmackin RSS

Deploying RPD using Mbean

Irfan Khan Newbie
Currently Being Moderated
I want to use this Mbean and carry out this operation of upload repository using command line

We can access this Mbean and do the same. Has anyone been able to do this, I m trying hard and dont know much of python here.

oracle.biee.admin:type=BIDomain.BIInstance.ServerConfiguration,biInstance=coreapplication, group=Service
Operation Name     uploadRepository
Description     Uploads the repository file whose full path is represented by rpdFilePath
Return Type     void

Sample script below works for getting status

Connecting to localhost:5301 as user: ikhan ...
Connecting to t3://localhost:5301 with userid ikhan ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'bidev'.

Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.

Connecting to Domain ...
Location changed to domain custom tree. This is a writable tree with No root.
For more help, use help(domainCustom)

Connecting to BIDomain MBean ...
Connecting to BIInstance MBean ...
BIInstance MBean; ServiceStatus: FULLY_STARTED

Exiting WebLogic Scripting Tool.

# Example to demonstrate connecting to a BIEE domain using WLST
# This scripts expects the following arguments:
# 1. (localhost)
# 2. wls.port (7001)
# 3. wls.user (user1)
# 4. wls.password (password1)
# ===================================================================

import sys
import os

# Check the arguments to this script are as expected.
# argv[0] is script name.
argLen = len(sys.argv)
if argLen -1 != 4:
print "ERROR: got ", argLen -1, " args."
print " eg: wlst.cmd localhost 7001 user1 password1"

WLS_HOST = sys.argv[1]
WLS_PORT = sys.argv[2]
WLS_USER = sys.argv[3]
WLS_PW = sys.argv[4]

print 'Connecting to '+ WLS_HOST+ ':' + WLS_PORT + ' as user: ' + WLS_USER + ' ...'

# Connect to WLS
connect(WLS_USER, WLS_PW, WLS_HOST+ ':' + WLS_PORT);

print 'Connecting to Domain ...'
cd ('oracle.biee.admin')
print 'Connecting to BIDomain MBean ...'
cd ('oracle.biee.admin:type=BIDomain,group=Service')

biinstances = get('BIInstances')
biinstance = biinstances[0]

print 'Connecting to BIInstance MBean ...'
cd ('..')
cd (biinstance.toString())

print 'BIInstance MBean; ServiceStatus: ' + servicestatus

  • 1. Re: Deploying RPD using Mbean
    benmackin Newbie
    Currently Being Moderated
    I was able to accomplish this. [My Blog post on the Subject|]

    Here is the relevant python pieces you would need to lock, upload, and commit. The blog post has a full shell script and python script implementation.

    # Lock the System
    print("Calling lock ...")
    objs = jarray.array([], java.lang.Object)
    strs = jarray.array([], java.lang.String)
    invoke("lock", objs, strs)

    # go to the server configuration
    print("Uploading RPD")
    # Set the parameters
    params = jarray.array([rpdpath,rpdPassword],java.lang.Object)
    # Set the parameters Signs
    sign = jarray.array(["java.lang.String", "java.lang.String"],java.lang.String)
    # Invoke the procedure
    invoke( "uploadRepository", params, sign)

    # Commit the system
    print("Commiting Changes")

    objs = jarray.array([], java.lang.Object)
    strs = jarray.array([], java.lang.String)
    invoke("commit", objs, strs)


  • Correct Answers - 10 points
  • Helpful Answers - 5 points