Skip navigation.
Downloads | Product Documentation | Support

WebLogic Server Command Reference

## CREATE

Creates an instance of a WebLogic Server Administration or Local Configuration MBean, however, BEA recommends that you do not use it to create Local Configuration MBeans. This command cannot be used for Runtime MBeans.

If the command is successful, it returns `OK`.

When you use this command to create an Administration MBean instance, you must use the `-url` argument to specify the Administration Server. WebLogic Server populates the Administration MBean with default values and saves the MBean's configuration in the domain's `config.xml` file. For some types of Administration MBeans, WebLogic Server does not create the corresponding Local Configuration MBean replica until you restart the server instance that hosts the underlying managed resource. For example, if you create a `JDBCConnectionPool` Administration MBean to manage a JDBC connection pool on a Managed Server named ManagedMedRecServer, you must restart ManagedMedRecServer so that it can create its local replica of the `JDBCConnectionPool` Administration MBean that you created. For more information on MBean replication and the life cycle of MBeans, refer to "MBeans for Configuring Managed Resources" in the Programming WebLogic Management Services with JMX guide.

### Syntax

>     java [ SSL Arguments ] weblogic.Admin
>          [-url URL]
>          [ User Credentials Arguments ]
>        CREATE -name name -type mbeanType

or

>     java [ SSL Arguments ] weblogic.Admin
>          [-url URL]
>          [ User Credentials Arguments ]
>        CREATE -mbean objectName

Argument | Definition
--- | ---
-url [`protocol``://`]`listen-address:listen-port` | Specify the listen address and listen port of the Administration Server. You can create Administration MBeans only on the Administration Server. If you specify a secure listen port, you must also specify a secure protocol. If you do not specify a value, the command assumes `t3://localhost:7001`. For more information, refer to the -url entry in Table 1-3 on page 11 and Protocol Support. Although the `CREATE` command also supports the `-adminurl` argument, we recommend that you do not use `CREATE` to create Local Configuration MBeans.
`-name` `name` | The name you choose for the MBean that you are creating.
`-type` `mbeanType` | The type of MBean that you are creating. For more information, refer to Specifying MBean Types.
`-mbean` `objectName` | Fully qualified object name of an MBean in the `WebLogicObjectName` format. For example: `"``domain``:Type=``type``,Name=``name``"` For more information, refer to the Javadoc for `WebLogicObjectName`.

### Example

The following example uses the `-name` and `-type` arguments to create a JDBCConnectionPool Administration MBean named `myPool` on an Administration Server:

>     java weblogic.Admin -url AdminHost:7001 -username weblogic
>        -password weblogic CREATE -name myPool -type JDBCConnectionPool

For more information about the environment in which this example runs, refer to Example Environment.

If the command succeeds, it prints the following to standard out:

`Ok`

The following example uses the `-mbean` argument and `WebLogicObjectName` conventions to create a JDBCConnectionPool Administration MBean named `myPool` on an Administration Server:

>     java weblogic.Admin -url AdminHost:7001 -username weblogic
>        -password weblogic
>         CREATE -mbean "mydomain:Type=JDBCConnectionPool,Name=myPool"