Wlst migratable target creation

I've been trying to dynamically add candidate servers within a wlst script. Here is what I have so far wondering how I can generate the jarray based on number of managed JMVs.
migratableTargets = migratableTargetList.split(',')
mgdNames = mgdNameList.split(',')
# Migratable target function
def createMigratableTarget(mtnFnc,cnFnc,mnFnc):
cd('/')
cmo.createMigratableTarget(mtnFnc)
cd('/MigratableTargets/'+mtnFnc)
cmo.setCluster(getMBean('/Clusters/'+cnFnc))
cmo.setUserPreferredServer(getMBean('/Servers/'+mnFnc))
cmo.setMigrationPolicy('manual')
# Set servers for migratble target
cd('/MigratableTargets/'+mtnFnc)
*set('ConstrainedCandidateServers',jarray.array([ObjectName('com.bea:Name='+mgdNames[0]+',Type=Server'), ObjectName('com.bea:Name='+mgdNames[1]+',Type=Server')], ObjectName))*
# Create a migratable target for each JVM
count = 1
while count <= int(clusterNodes):
createMigratableTarget(migratableTargets[(count-1)],clusterName,mgdNames[(count-1)])
count += 1
The props file I'm loading:
clusterNodes=2
clusterName=jms_dv1
mgdNameList=jms_dv1_01,jms_dv1_02
migratableTargetList=ensMigratableTarget_01,ensMigratableTarget_02
So in this example the script works fine but lets say I had a 4 node cluster I would need to come back to this script to edit the line in bold for each node and I really don't want to do that. My thought path right now is how to do this with python but maybe I can use different wlst to do what I'm after. I'm still digging in and might figure it out but figured I'd ask around.
Thanks

Hi..
Domain name..
cd('/')
set('Name', domain_name) - where domain_name is a variable containing what you want to call the domain.
domain location..
writeDomain(domain_home) - where domain home is the root of where the domain will be located..
there's lots of examples of wlst scripting, just a case of finding them..

Similar Messages

  • Offline WLST changes JMS Server Target From a Migratable target

    I have a simple WL 9.2mp2 domain which has 2 managed servers, one JMS Server and two migratable targets (one for each managed server) and the JMS server is targeted to one of the migratable targets. When I read the domain into WLST offline, the JMS server's target is changed from the migratable target to the preferred server defined in the migratable target. Is this a bug in WLST? Am I missing some option on WLST that can fix this?
              I saw a similar posting for 8.1 and no resolution.
              Thanks in advance,
              Mark.

    Hi
              Please find my answers below:
              Q1:
              It depends how you configured the JMSSevers.
              If both the JMSServers are targeted to the same MigratableTarget, then you do the migration only once, that will move both of them to the new active server.
              If not, you have to perform the migration once for each MT.
              Q2:
              No, you dont have to start the Managed Server II, unless otherwise you wanted it to be readily available for the migration next time.
              Q3:
              You can just repeat the migration process by specifying the destination as Maganged Server-I this time. You dont need change the configuration for this, since the MT, shall already have the Candidate servers M1 and M2 and both JMSServers are targeted to MT.
              Q4:
              Yes, as long as the CF is targeted to the cluster, your connection is valid. But your destinations references will become invalid after migration, so you have to have some logic in the exception listeners to reconnect again.
              Hope this helps.

  • OSB: cluster creation script fails to delete migratable targets

    Hi,
    I am working on a wslt script which creates an OSB domain with a cluster with one admin server and two managed servers. In this script, after adding the OSB required templates, I would like to delete the migratable targets created by the template. I do this like this:
    cut
    def deleteResources(mbeanType):
         log ('Deleting resources of type %s' % mbeanType)
         cd('/')
         mbeans = get(mbeanType+'s')
         for mbean in mbeans:
              log ('\tDeleting %s' % mbean.name)
              cd('/')
              delete(mbean.name, mbeanType)
    def deleteTemplateGeneratedResources():
         deleteResources('JMSServer')
         deleteResources('SAFAgent')
         deleteResources('FileStore')
         deleteResources('JMSSystemResource')
         deleteResources('JDBCSystemResource')
         deleteResources('MigratableTarget')
    deleteTemplateGeneratedResources()
    cut
    This goes through but when I save the domain (updateDomain()) the migratable targets still exist! I tried it manually on this domain after I do the delete() the migratable targets disapper (ls('/MigratableTarget') fails saying there is no MigratableTarget). However, after I do an updateDomain() the migratable targets remain. How can I get rid of them? Why don't they get removed?
    Regards
    Dimo

    I tried deleting and creating them anew but it then messes up the configuration of the migratable targets. What seems to work now is to delete them, create new ones with DIFFERENT names and then updateDomain(). In this case the old ones get really deleted. Really messy stuff.

  • Jython code to add migratable target

    Hi,
    I am trying to add migrable target using following wslt jython commands:
    edit();
    startEdit();
    cd('/');
    jmsnode = cd('JMSServers/jmsnode1BL');
    cd('/');
    target = cd('MigratableTargets/ejbnode1_migratable');
    cd('/');
    jmsnode.addTarget(target);
    save();
    stopEdit('y');
    Above code throws following exception:
    Traceback (innermost last):
      File "<string>", line 1, in ?
      File "<iostream>", line 388, in save
      File "<iostream>", line 520, in raiseWLSTException
    WLSTException: Error occurred while performing save : Save failed: There are some invalid changes which need to be resolved. : weblogic.descriptor.DescriptorValidateException: The following failures occurred:
    -- Since the JMS server jmsnode1BL or SAF agent is targeted to a migratable target, it cannot use the default store
    How to set custom persistent store for a migratable target using python code ?
    Could anyone please help ?
    PS: Creation of JMS servers is done using JMX, but only addtarget is done python code.
    Thanks,
    Amal

    Hi,
           First of all think about a simple design of creating two different flows with the help of infosurce. In transformation, give constant value to ZTYPE with different infosource and load the data. If that is not what you want(as i havent got your requirement properly, you can try the below thing.
    It is not possible with only start routine. I think you will need to create an expert routine here. The code will be as below.
    LOOP AT SOURCE PACKAGE into SOURCE_FIELDS.
       ASSIGN all source fields to RESULT_FIELDS.
       and add RESULT_FIELDS-<ZTYPE> = "INTERNAL"
       APPEND RESULT_FIELDS to RESULT_PACKAGE.
        Again assign all source fields to RESULT_FIELDS.
      and add RESULT_FIELDS-<ZTYPE> =  "EXTERNAL"
       APPEND RESULT_FIELD-<ZTYPE> = "INTERNAL".
    ENDLOOP.
    I hope this logic will help you.
    Regards,
    Harpal.

  • Migratable targets for singleton implementations

    Hi,
    I require some help regarding the use of migratable targets with singleton implementations
    We have a WebLogic 11g environment comprising several managed servers in a cluster. Migratable Targets are also been defined for JMS and JTA services.
    The deployment includes two EARs which may only be deployed to a single server at any one time. The first EAR contains JARs, a WAR and a RAR. The second contains JARs and EJBs. We wish to implement a fail-over solution for these "singleton" EARs on the cluster so that everything would get migrated to another server in the cluster if the initial pinned server fails.
    We had hoped to use the same mechanism as for JMS and JTA services whereby the EARs would simply assigned to a migratable target (with a defined user preferred server and constraint candidate servers). However from reading the documentation and trying out some deployments this scenario does not seem to be supported by WebLogic. For example, a migratable target may not be given as a target during EAR deployment.
    The only option for the singleton services seems to be inheriting from the SingletonService and deploying this to preferred- and candiates servers but this would mean changing quite a few services and we are not sure how to manage the "singleton" RAR.
    Does Weblogic 11g offer a way to deploy a complete EAR to a deployable target? If not, could you please suggest an alternative way of implementing a fail-over solution for our EARs.
    Thanks in advance for your help.
    Regards. Ian.

    I tried deleting and creating them anew but it then messes up the configuration of the migratable targets. What seems to work now is to delete them, create new ones with DIFFERENT names and then updateDomain(). In this case the old ones get really deleted. Really messy stuff.

  • Migratable target question

    Hi, I created a cluster on two machines A and B. I have an application that can only be running in one server, but needs to fail-over to another server in the event of server failure.
    1. Machine A has AdminServer and ManagedServer1 running.
    2. Machine B has ManagedServer2 running.
    3. I configured a migratable target "MigratableTarget-0" with Service Migration Policy "Auto-Migrate Exactly-Once Services", User-Preferred Server: ManagedServer1.
    Constrained Candidate Servers Chosen "ManagedServer1, ManagedServer2".
    4. Then I deploy the application to ManagedServer1. I verified the application is deployed to both machines A and B.
    5. Restart all 3 servers
    ManagedServer1 is running with the application but prints the following error message repeatly every few seconds:
    <Sep 24, 2008 9:01:23 AM PDT> <Warning> <Cluster> <BEA-000192> <No currently living server was found that could host MigratableTarget-0. The server will retry in a few seconds.>
    When ManagedServer1 is shutdown, the same error message is printed out by ManagedServer2. The application is not migrated.
    Any help on this would be appreciated.

    I think you need to read about "User-Defined Singleton Services" in the docs.
    Applications are not automatically run on one-and-only-one server in a cluster, in order to get that type of behavior, you need to implement an API and perform some configuration. Please read the following and perhaps describe your situation more fully. For example, do you really need the app to only run in one server (you keep state in memory isn't shared, etc).
    http://edocs.bea.com/wls/docs100/cluster/service_migration.html#wp1051458

  • Exchange 2010 - 2013 Public Folder Migration target database gets much bigger than source database

    Hi,
    i have a question about the pf migration from Exchange 2010 to Exchange 2013. The source database ist about 370 GB. The migration process is still running. At the moment the target database is already 491GB big. Is that a normal behaviour during the migration
    process.
    Thanks

    Hi,
    After you have finished the public folder migration process, you can compare the item count of public folders to make sure all public folders have been moved to Exchange 2013.
    You can check this by comparing the snapshots before and after the migration. You can refer to the "How do I know this worked?" section in the following article.
    Migrate Public Folders to Exchange 2013 From Previous Versions
    http://technet.microsoft.com/en-us/library/jj150486(v=exchg.150).aspx
    Best regards,
    Belinda
    Belinda Ma
    TechNet Community Support

  • How to migrate targets from one oem to another oem

    Hi ,
    we have two gridcontrols as follows
    https://oemgrid1:7799/em/console
    https://oemcnt:7799/em/console
    we have to move the 10 targets from one OEM ( https://oemgrid1:7799/em/console) to another OEM ( https://oemcnt:7799/em/console ) inclusing data ...
    how to migrate , any idea ?

    A) Assuming that both the EM are of same version, then you cannt migrate data and targets from one em to another.
    B) Assuming that both the EM are of different versions like EM1 10.2.0.5 and EM2 12.1.0.2 then also you cannt migrate data and targets from one em to another. In this case you still have the option to undergo the EM Upgrade process which will automate the historical data and target migration. Read about EM upgrade : http://docs.oracle.com/cd/E24628_01/upgrade.121/e22625/toc.htm

  • Cross Plateform Migration:Target Folder not found

    Hi All
    I am try to use Cross Plateform Migration Fnction to migrate Data to AD file server. and I have perform [Migrate Data and Trustees] to migrate "user to user", but the last step "Validate", it show "Target folder not found "....Ireview all steps I set...indeed I seem not set target file server path.
    But I do not which step let me could set Target File Server, By using Policy or which place ? Who could kindly tell me How to set Target File Server path ?
    thanks!!
    wyldkao

    wyld,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://forums.novell.com/faq.php
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://forums.novell.com/

  • Transport Groups & Transport Targets Creation for BS

    Hi,
    I have DEV and  QTY Servers And i have 2 seperate SLD's. i need to do BS Export.
    In Which Server we have to create Transport Groups and Transport Targets????
    Regards
    Bopanna

    Hi ,
    Refer to these weblogs and links
    Overview of Transition from Dev to QA in XI
    /people/sravya.talanki2/blog/2005/11/02/overview-of-transition-from-dev-to-qa-in-xi
    /people/sap.india5/blog/2005/11/09/xi-software-logistics-ii-overview
    Two types of transport mechanism are used in PI.
    • File transport method.
    • CMS transport method.
    File transport method:
    http://help.sap.com/saphelp_nw04/helpdata/en/a8/5e56006c17e748a68bb3843ed5aab8/frameset.htm
    CMS transport method:
    http://help.sap.com/saphelp_nw04/helpdata/en/a8/5e56006c17e748a68bb3843ed5aab8/frameset.htm
    • CMS for SAP Exchange Infrastructure:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b8d8f7b2-0701-0010-b09a-cda4cca2c98e
    • How to handle Xi with CMS:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/43f5d790-0201-0010-2984-ff72d822b109
    • Configuration of CMS in Central NWDI & SLD to transport XI objects:
    /people/praveen.mayalur/blog/2007/05/31/configuration-of-cms-in-central-nwdi-sld-to-transport-xi-objects
    • XI Software Logistics Solution III: CMS:
    /people/sap.india5/blog/2005/11/28/xi-software-logistics-solution-iii-cms
    Refer the configuring group and transport group for Business systems.
    http://help.sap.com/saphelp_nw04/helpdata/en/ef/a21e3e0987760be10000000a114084/frameset.htm
    Transport mechanism
    1. Create Technical System and Business Systems for the QA system.
    2. Create Transport Groups in the Business System.
    3. Create Transport Targets in the Source Business SYstem.
    Try with this
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/43f5d790-0201-0010-2984-ff72d822b109
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b8d8f7b2-0701-0010-b09a-cda4cca2c98e
    /people/sap.india5/blog/2005/11/03/xi-software-logistics-1-sld-preparation
    /people/sap.india5/blog/2005/11/09/xi-software-logistics-ii-overview
    /people/sap.india5/blog/2005/11/28/xi-software-logistics-solution-iii-cms
    https://websmp104n.sap-ag.de/nw04 -> SAP NetWeaver 2004 - Release-Specific Information -> How-to Guides -> Exchange Infrastructre
    1. How ToTransport XI Content Using CMS
    2. SAP XI 3.0 - Using CMS for SAP XI 3.0
    Also
    Look at the below weblog for XI transports.
    /people/sap.india5/blog/2005/11/03/xi-software-logistics-1-sld-preparation
    /people/sap.india5/blog/2005/11/09/xi-software-logistics-ii-overview
    /people/sap.india5/blog/2005/11/28/xi-software-logistics-solution-iii-cms
    CMS for SAP Exchange Infrastructure
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b8d8f7b2-0701-0010-b09a-cda4cca2c98e
    regards
    Aashish Sinha
    PS : reward points if helpful

  • WLST : To create SAF Agent targeted on Migratable servers

    I am trying to write wlst to create SAF Agent targeted on Migratable servers on existing file store and jms server.
    cmo.createSAFAgent('SAFAgent');
    safagent = cmo.lookupSAFAgent('SAFAgent');
    safagent.setStore(saffilestore);
    safagent.setServiceType('Sending-only');
    cmo = cd('/SAFAgents/SAFAgent')
    cmo.setTargets(jarray.array([ObjectName('com.bea:Name='jeem1 (migratable)',Type=MigratableTarget ')],Class.forName(weblogic.management.configuration.TargetMBean)))
    I am getting error javax.management.invalidattributevalueexception array has at least one null element
    Can somebody please help? Or can somebody let me know how to target SAFAgent to migratable target using wlst

    If you are not aware of how SAP works you should be carefull to use any non-SAP tooling. For instance if you want to change anything to the database you'd better use the SAP-tooling, otherwise SAP checks will complain. But if you just want to use OEMGC to monitor a SAP database (or more SAP db's) that will give no issues. SAP does not support the use OEMGC for other purposes but monitoring (SAP note 828268). Be aware that SAP has it's own monitoring tooling(CCMS), so you will introduce extra overhead using OEMGC.
    I advice you to first get familiar with Oracle in a SAP environment. As a starting point you could use http://www.sdn.sap.com/irj/sdn/ora.
    If you need a un/pw ask your SAP-team.
    Eric

  • How can I have custom data annotation attribute alter the Target of a migration?

    I want to create custom data annotation attributes in order to alter the database accordingly.
    To have this custom attribute apply, I want to create a
    custom MigrationOperation/SqlServerMigrationSqlGenerator in order to execute the database related changes.
    Now I need to get the migration Target (SQL Server: [__MigrationHistory table].[Target]) altered so that a manual/automatic migration will recognize the custom attribute and apply the custom MigrationOperation (and its inverse operation).
    How can I achieve this?
    I guess custom model based conventions may have to do something with this, but I'm not sure, though.
    Still people out there alive using the keyboard?
    Working with SQL Server/Visual Studio/Office/Windows and their poor keyboard support they seem extinct...

    Hello,
    >>Very strange... I've altered my Configuration file according to your amendments, but still no exception is thrown. Why doesn't it throw at my machine? I don't get it ...
    I am wondering if the order of the steps makes difference, my steps are follow:
    With your project, I comment out the TestMigrationConfiguration and replace it with a manual generated one and register the TestSqlGenerator in it.
    Then it throws the exception. I merge all separate classes to one as below which could generate the error, please have a try:
    using System;
    using System.Collections.Generic;
    using System.Data.Entity;
    using System.Data.Entity.Infrastructure.Annotations;
    using System.Data.Entity.Migrations;
    using System.Data.Entity.Migrations.Model;
    using System.Data.Entity.Migrations.Utilities;
    using System.Data.Entity.ModelConfiguration.Conventions;
    using System.Data.Entity.SqlServer;
    using System.Globalization;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.ComponentModel.DataAnnotations;
    namespace P200150121
    class Program
    static void Main(string[] args)
    using (MyContext ctx = new MyContext())
    ctx.t1.Add(new T1() { Name = "Test" });
    ctx.SaveChanges();
    public class T1
    public int ID { get; set; }
    [Required]
    [MaxLength(100)]
    [Test("de-DE")]
    public string Name { get; set; }
    [Required]
    public bool IsConfirmed { get; set; }
    public class MyContext : DbContext
    public DbSet<T1> t1 { get; set; }
    static MyContext()
    Database.SetInitializer<MyContext>(new MigrateDatabaseToLatestVersion<MyContext, Configuration>());
    protected override void OnModelCreating(DbModelBuilder modelBuilder)
    modelBuilder.Conventions.Add(new AttributeToColumnAnnotationConvention<TestAttribute, string>("TestAnnotation", (property, attributes) => attributes[0].CultureInfo.Name));
    //internal abstract class TestMigrationConfiguration : DbConfiguration
    // public TestMigrationConfiguration()
    // SetMigrationSqlGenerator("System.Data.SqlClient", () => new TestSqlGenerator());
    internal sealed class Configuration : DbMigrationsConfiguration<MyContext>
    public Configuration()
    AutomaticMigrationsEnabled = true;
    SetSqlGenerator("System.Data.SqlClient", new TestSqlGenerator());
    protected override void Seed(P200150121.MyContext context)
    // This method will be called after migrating to the latest version.
    // You can use the DbSet<T>.AddOrUpdate() helper extension method
    // to avoid creating duplicate seed data. E.g.
    // context.People.AddOrUpdate(
    // p => p.FullName,
    // new Person { FullName = "Andrew Peters" },
    // new Person { FullName = "Brice Lambson" },
    // new Person { FullName = "Rowan Miller" }
    internal class TestSqlGenerator : SqlServerMigrationSqlGenerator
    protected override void Generate(ColumnModel column, IndentedTextWriter writer)
    try
    AnnotationValues values = null;
    System.IO.File.AppendAllText("New Text Document.txt", column.Name + " Is GetValue : " + column.Annotations.TryGetValue("TestAnnotation", out values) + "\r\n");
    if (values != null)
    throw new Exception(string.Format("oldValue1='{0}', newValue1='{1}'", values.OldValue, values.NewValue));
    values = column.Annotations["TestAnnotation"];
    throw new Exception(string.Format("oldValue1='{0}', newValue1='{1}'", values.OldValue, values.NewValue));
    catch (KeyNotFoundException)
    base.Generate(column, writer);
    [AttributeUsage(AttributeTargets.Property)]
    public class TestAttribute : Attribute
    private CultureInfo _cultureInfo = CultureInfo.CurrentCulture;
    public CultureInfo CultureInfo { get { return _cultureInfo; } }
    public TestAttribute()
    public TestAttribute(string cultureName)
    _cultureInfo = new CultureInfo(cultureName);
    public TestAttribute(int lcid)
    _cultureInfo = new CultureInfo(lcid);
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Wlst offline - create a new domain in weblogic portal 10.2

    Hi,
    Any one have automation script to create weblogic portal domain, create portlet data base ( not point base).and Domain resources: Machines,Servers, Clusters and data sources. I tried the one which comes with installation ( wlst offlie domain creation script), but it is just configuring weblogic server but not portal.
    Thanks.
    Krishna.

    #=======================================================================================
    # WLST Common Script Library Functions (these functions support both WLS 8.1.x and 9.x)
    #=======================================================================================
    __all__ = []
    import os
    from java.io import FileInputStream
    from java.util import Properties
    from java.lang import String
    import jarray
    #=======================================================================================
    # RAVI enable library functions to see and use WLST functions
    #=======================================================================================
    def initialise(topLevelNamespace):
    for f in ("addTemplate", "closeDomain", "closeTemplate", "exit", "readDomain",
    "readTemplate", "updateDomain", "writeDomain", "cd", "assign",
    "assignAll", "create", "delete", "get", "loadDB", "set", "setOption",
    "unassign", "unassignAll", "dumpStack", "dumpVariables", "help", "ls",
    "prompt", "pwd", "startRecording", "stopRecording", ):
    globals()[f] = topLevelNamespace[f]
    __all__.append(f)
    #=======================================================================================
    # Load Properties
    #=======================================================================================
    def loadPropertiesFromFile(filename):
    props = addPropertiesFromFile(filename, {})
    return props
    #=======================================================================================
    # Load Properties
    #=======================================================================================
    def addPropertiesFromFile(filename, props):
    properties = Properties()
    input = FileInputStream(filename)
    properties.load(input)
    input.close()
    for entry in properties.entrySet(): props[entry.key.strip()] = entry.value.strip()
    return props
    #=======================================================================================
    # Get WebLogic Version (eg. returns '8.1.5.0', '9.1.0.0', '9.2.0.0')
    #=======================================================================================
    def getWebLogicVersion():
    return cd('/').getConfigurationVersion()
    #=======================================================================================
    # Get Machine Create Type (returns 'UnixMachine' or 'Machine')
    #=======================================================================================
    def getMachineCreateType():
    # On Unix, machine type is 'UnixMachine' on Windows it is 'Machine'
    if os.pathsep == ':':
    return 'UnixMachine'
    else:
    return 'Machine'
    #=======================================================================================
    # Get Machine Directory Type (returns 'UnixMachine' or 'Machine')
    #=======================================================================================
    def getMachineDirectoryType():
    # On Unix, machine type is 'UnixMachine' on Windows it is 'Machine'
    if os.pathsep == ':':
    # When moving from WLS 9.1 to WLS 9.2, WLS changed name of unix machines from
    # 'UnixMachine' to just 'Machine'
    wlsVersion = getWebLogicVersion()
    if wlsVersion.startswith('8') or wlsVersion.startswith('9.0') or wlsVersion.startswith('9.1'):
    return 'UnixMachine'
    else:
    return 'Machine'
    else:
    return 'Machine'
    #=======================================================================================
    # Set Domain Options
    #=======================================================================================
    def setDomainOptions(prodMode, javaHome):
    setOption('OverwriteDomain', 'true')
    setOption('ServerStartMode', prodMode)
    setOption('JavaHome', javaHome)
    setOption('CreateStartMenu', 'false')
    #=======================================================================================
    # Set System User
    #=======================================================================================
    def setSystemUser(domainname, username, password):
    sysUser = cd('/Security/%s/User/weblogic' % domainname)
    sysUser.setName(username)
    sysUser.setPassword(password)
    #=======================================================================================
    # Create WLS81 Oracle Database Pool
    #=======================================================================================
    def createWLS81OracleDatabasePool(dbName, dbUsername, dbPassword, dbDriver, dbUrl):
    newPool = create(dbName, 'JDBCConnectionPool')
    newPool.setDriverName(dbDriver)
    newPool.setURL(dbUrl)
    newPool.setPassword(dbPassword)
    newPool.setInitialCapacity(5)
    newPool.setTestFrequencySeconds(60)
    newPool.setTestConnectionsOnRelease(1)
    newPool.setTestConnectionsOnReserve(1)
    newPool.setConnectionReserveTimeoutSeconds(60)
    newPool.setUserName(dbUsername)
    return newPool
    #=======================================================================================
    # Create WLS81 Data Source
    #=======================================================================================
    def createWLS81DataSource(dsType, dsName, jndiName, poolName):
    ds = create(dsName, dsType)
    ds.setJNDIName(jndiName)
    ds.setPoolName(poolName)
    return ds
    #=======================================================================================
    # Configure WLS9 Oracle Database
    #=======================================================================================
    def configureWLS9OracleDatabase(dsName, jndiNames, driver, host, port, sid, username, password, targets):
    cd('/')
    dataSource = create(dsName, 'JDBCSystemResource')
    cd('/JDBCSystemResource/' + dsName + '/JdbcResource/' + dsName)
    dbParam = create('dbParams','JDBCDriverParams')
    cd('JDBCDriverParams/NO_NAME_0')
    dbParam.setDriverName(driver)
    set('URL', 'jdbc:oracle:thin:@' + host + ':' + port + ':' + sid)
    dbParam.setPasswordEncrypted(password)
    dbProps = create('props','Properties')
    cd('Properties/NO_NAME_0')
    dbUser = create('user', 'Property')
    dbUser.setValue(username)
    cd('/JDBCSystemResource/' + dsName + '/JdbcResource/' + dsName)
    create('jdbcDataSourceParams','JDBCDataSourceParams')
    cd('JDBCDataSourceParams/NO_NAME_0')
    set("JNDINames", jndiNames)
    cd('/JDBCSystemResource/' + dsName + '/JdbcResource/' + dsName)
    create('jdbcConnectionPoolParams','JDBCConnectionPoolParams')
    cd('JDBCConnectionPoolParams/NO_NAME_0')
    set('TestTableName','SQL SELECT 1 FROM DUAL')
    set('TestConnectionsOnReserve','true')
    assign('JDBCSystemResource', dsName, 'Target', targets)
    return dataSource
    #=======================================================================================
    # Configure WLS102 DB2
    #=======================================================================================
    def configureWLS102DB2(dsName, jndiNames, driver, host, port, sid, username, password, targets, trans, url, testquery):
    print 'datasource('+dsName+','+ jndiNames+','+ driver+','+ host+','+ port+','+ sid+','+ username+','+ password+','+targets+','+ trans+','+url+',' + testquery +'):'
    cd('/')
    dataSource = create(dsName, 'JDBCSystemResource')
    cd('/JDBCSystemResource/' + dsName + '/JdbcResource/' + dsName)
    dbParam = create('dbParams','JDBCDriverParams')
    cd('JDBCDriverParams/NO_NAME_0')
    dbParam.setDriverName(driver)
    #set('URL', 'jdbc:bea:db2://' + host + ':' + port)
    set('URL', url)
    dbParam.setPasswordEncrypted(password)
    #dbParam.setPassword(password)
    dbProps = create('props','Properties')
    cd('Properties/NO_NAME_0')
    dbUser = create('user', 'Property')
    dbUser.setValue(username)
    dbPortNumber = create('portNumber', 'Property')
    dbPortNumber.setValue(port)
    dbDbName = create('databaseName', 'Property')
    dbDbName.setValue(sid)
    dbHost = create('serverName', 'Property')
    dbHost.setValue(host)
    dbBatch = create('batchPerformanceWorkaround', 'Property')
    dbBatch.setValue('true')
    cd('/JDBCSystemResource/' + dsName + '/JdbcResource/' + dsName)
    create('jdbcDataSourceParams','JDBCDataSourceParams')
    cd('JDBCDataSourceParams/NO_NAME_0')
    jndiNamesAray=jndiNames.split(',')
    set('JNDINames', jndiNamesAray)
    set('GlobalTransactionsProtocol', trans)
    #cd('/JDBCSystemResources/ttttt/JDBCResource/ttttt/JDBCDataSourceParams/ttttt')
    #cd('/JDBCSystemResource/' + dsName + '/JdbcResource/' + dsName)
    #cd('JDBCDataSourceParams/NO_NAME_0')
    #dbDatasource = cmo
    #dbDatasource.setGlobalTransactionsProtocol(trans)
    cd('/JDBCSystemResource/' + dsName + '/JdbcResource/' + dsName)
    create('jdbcConnectionPoolParams','JDBCConnectionPoolParams')
    cd('JDBCConnectionPoolParams/NO_NAME_0')
    #set('TestTableName','SQL SELECT COUNT(*) FROM SYSIBM.SYSTABLES')
    set('TestTableName',testquery)
    set('TestConnectionsOnReserve','true')
    assign('JDBCSystemResource', dsName, 'Target', targets)
    cd('/JDBCSystemResources/'+dsName)
    #targetsAray=[targets]
    #set('Targets',targetsAray)
    return dataSource
    #=======================================================================================
    # Set Common Server Settings
    #=======================================================================================
    def setCommonServerSettings(server):
    server.setNativeIOEnabled(1)
    server.setWeblogicPluginEnabled(1)
    #=======================================================================================
    # Set Server Logging
    #=======================================================================================
    def setServerLogging(server, logpath, level):
    cd('/Server/' + server.getName())
    log = create(server.getName(), 'Log')
    log.setFileName(logpath + '/' + server.getName() + '.log')
    log.setRotationType('byTime')
    log.setRotationTime('02:00')
    log.setFileTimeSpan(24)
    log.setFileCount(7)
    log.setLogFileSeverity(level)
    #=======================================================================================
    # Set Web Server
    #=======================================================================================
    def setWebServer(server, logpath, frontEndHost, frontEndPort, frontEndSSLPort):
    cd('/Server/' + server.getName())
    webServer = create(server.getName(), 'WebServer')
    webServer.setFrontendHost(frontEndHost)
    webServer.setFrontendHTTPPort(frontEndPort)
    webServer.setFrontendHTTPSPort(frontEndSSLPort)
    wlsVersion = getWebLogicVersion()
    if wlsVersion.startswith('9') or wlsVersion.startswith('10'):
    cd('/Server/' + server.getName() + '/WebServer/' + server.getName())
    webServerLog = create(server.getName(),'WebServerLog')
    webServerLog.setFileName(logpath + '/' + server.getName() + '_access.log')
    webServerLog.setRotationType('byTime')
    webServerLog.setRotationTime('02:00')
    webServerLog.setFileTimeSpan(24)
    webServerLog.setFileCount(7)
    else:
    webServer.setLogFileName(logpath + '/' + server.getName() + '_access.log')
    webServer.setLogRotationType('date')
    webServer.setLogRotationTimeBegin('01-01-2006-2:00:00')
    webServer.setLogRotationPeriodMins(1440)
    webServer.setLogFileCount(7)
    #=======================================================================================
    # Create Boot Properties File
    #=======================================================================================
    def createBootPropertiesFile(directoryPath, username, password):
    file = open (directoryPath + '/boot.properties', 'w')
    file.write('username=%s\n' % username)
    file.write('password=%s\n' % password)
    file.flush()
    file.close()
    Hopefully this will work for you

  • Oracle weblogic Server 10g R3 -manual JMS migration and reverse migration

    Folks
    we are trying to use manual JMS migration with WLST scripts /console and noticed several issues in Oracle weblogic serevr 10g R3 .(Currently not interested in using automatic server migration stuff)
    1)Our use case is to be able to manually migrate JMS with persistent file store in case of long lasting hardware failure (so we need this working with the source server down)
    Here are my observations
    1) The console based manual migration works only when both the source and destination are up (ie for doing migration during scheduled maintainance and not for our use case)
    2) i tried wlst scripts which works partially for our use case
    wls:/jmsmigrationclustertestdomain/edit !> migrate('sb_ms1', 'sb_ms2','true','fa
    lse','all')
    Migrating JMS and JTA services from 'sb_ms1' to destination 'sb_ms2' ...
    Migration completed successfully.
    question is how do you migrate this back (reverse migration)
    I tried a couple of wlst scripts which all were unsuccessful in migrating the services back. Syntax is also extremly confusing as the weblogic.Admin commands seem to be aware of "migratable targets" (such as "sb_ms1 migratable") but WLST doesnt seem to understand "sb_ms1 migratable"
    If I just restart sb_ms1 without running any scripts, it complains about JMS artifacts(not being present) as they are migrated onto the other instance
    I have this whole setup working on 9.2mp3 with weblogic.admin scripts
    Thanks for any guidance on this

    Hi,
    I guess you are using the default (system generated) migratable target names for the clustered servers, that have names ends with "(migratable)".
    Are you performing the migration from "wls:/YOUR_ADMIN_SERVER_NAME/domainRuntime/MigratableServiceCoordinatorRuntime/the-MigratableServiceCoordinator" ?
    Can you please post the exact WLST commands that you tried, syntax of the arguments and any erorr messages taht you have got while performing this operation?
    Thanks
    Kats

  • Cross-Reference creation

    Hello to all!
    I am new to this amazing world of Extendscript but I have been using Framemaker since version 5.5.
    I am working on a kind of cross-reference manager and it works really nice. I can list all cross-references at book or document level, select the cross-reference to be shown in the current document and so on. I am using non-structured FM.
    The problem I am facing is the creation of cross-reference itself.I know how to create a Cross-Ref Marker for the Xref, but I don´t know how to insert the Xref into the content. I tried with NewAnchoredFormattedObject function with objType, format and textLoc parameters. Also there´s the XRefSrcText property (string containg unique ID:pgf_tag:text).
    The question is: Should I use the same string (the content of XRefSrcText) as text for the Cross-Ref type Marker? Or just the pgf text that contains the Cross-Ref?
    I have found several examples using Framescript but I am unable to replicate the code using ES.
    Thanks for reading me. I will appreciate any help on this.
    Regards

    Hi again Jang:
    I have been trying to create the XREF following your suggestions:
    First I created a XREF using the FM procedure. Then I created a code to get the info from Data Browser in the ESTK.
    Then I created a XREF using my own code: FM recognizes the XREF (as you can see on the right image) but I cannot get any cross-ref on the content.
    Here is the code for the Cross-ref marker target creation:
    var doc = app.ActiveDoc;
    var flow = doc.MainFlowInDoc;
    var pgf = doc.TextSelection.beg.obj
    var tLoc, marker, markerType;
    tLoc = new TextLoc(pgf, 0);
    marker = doc.NewAnchoredObject(Constants.FO_Marker, tLoc);
    markerType = doc.GetNamedObject(Constants.FO_MarkerType, "Cross-Ref");
    marker.MarkerTypeId = markerType;
    marker.MarkerText = "10978: Heading1: PREAMBLE";
    Here is the code I am using to create the XREF:
    var doc = app.ActiveDoc;
    var flow = doc.MainFlowInDoc;
    var pgf = doc.TextSelection.beg.obj;
    var oTLoc1=new TextLoc (pgf, 0);
    var format="Page";
    var newcrossref=doc.NewAnchoredFormattedXRef(format, oTLoc1);
    newcrossref.XRefFmt.Name=format;
    newcrossref.XRefSrcText= "10978: Heading1: PREAMBLE";
    I have tried with tons of modifications but without success.
    I hope you can help me!
    Regards

Maybe you are looking for

  • Can u  guys plz helpme out with this....

    what is the difference between Sy-tabix and Sy- index?

  • Can I recover data from an internal hard drive that I removed from my MB Pro?

    A few months back my HD failed on my MB pro.  I have since then replaced this HD with a SSHD.  My question is can I recover this data from the old hard drive?  I remember when I was at the Genius Bar one of the techs told me there was a company I cou

  • Best practice for index creation

    Hello, I am working on Oracle 10g and AIX. I have one table with 9 columns. The sql queries on this table are such that out of 10 column it always having 5 column in the where clause. So ,we have concatenated index on these 5 columns. Other columns 4

  • IPhoto library missing after crash

    Had just launched iPhoto to tweak some photos and it froze on me. Attempted a force-quit and it froze my PowerBook. Forced a restart and when i re-launched iPhoto, it reverted to a fresh, newly-launched version; i.e., no library! This was accompanied

  • Access to iPod content?

    OK... I think this falls into the category of "nice idea but not supported now": I'd like to be able to access content on an iPod via my Apple TV. While most/all of the content on MY iPod(s) are also in an iTunes library -- and therefore accesible fr