⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 alsbconfigurationmbean.html

📁 一个实用的java源程序
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_11) on Fri Jan 25 02:21:56 EST 2008 -->
<TITLE>
ALSBConfigurationMBean
</TITLE>

<META NAME="keywords" CONTENT="com.bea.wli.sb.management.configuration.ALSBConfigurationMBean interface">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="ALSBConfigurationMBean";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../../com/bea/wli/sb/management/configuration/BusinessServiceConfigurationMBean.html" title="interface in com.bea.wli.sb.management.configuration"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../../index.html?com/bea/wli/sb/management/configuration/ALSBConfigurationMBean.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="ALSBConfigurationMBean.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.bea.wli.sb.management.configuration</FONT>
<BR>
Interface ALSBConfigurationMBean</H2>
<DL>
<DT><B>All Superinterfaces:</B> <DD>weblogic.management.provider.Service</DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>ALSBConfigurationMBean</B><DT>extends weblogic.management.mbeanservers.Service</DL>
</PRE>

<P>
Provides various API to query, export and import resources, obtain validation errors, get and set environment values, and in general manage resources in an ALSB domain.<p> <h3>MBean instances:</h3> There is a separate instance of ALSBConfigurationMBean for each session. There is also one more ALSBConfigurationMBean instance which works on the core data, i.e., the data which ALSB runtime uses. An ALSBConfigurationMBean instance is created whenever a new session is created via the <A HREF="../../../../../../com/bea/wli/sb/management/configuration/SessionManagementMBean.html#createSession(java.lang.String)"><CODE>SessionManagementMBean.createSession(String)</CODE></A> API. This mbean instance is then used to perform configuration operations in that session. The mbean instance is destroyed when the corresponding session is activated or discarded.<p> More information about Sessions can be found in javadoc for <A HREF="../../../../../../com/bea/wli/sb/management/configuration/SessionManagementMBean.html" title="interface in com.bea.wli.sb.management.configuration"><CODE>SessionManagementMBean</CODE></A> <h3> Availability of ALSBConfigurationMBean during server startup</h3> The initial registeration of ALSBConfigurationMBean instances for the core data and the existing sessions is performed after the server has started all the applications. More precisely, these mbeans are registered in the postStart method that is generated when loading the ALSB kernel application. Any attempt to access the mbeans before this point will fail. <p> <h3> Read vs. Write Operations: </h3> Read operations are allowed on all sessions and on the core data via the corresponding MBean instance. Write operations, however, are only limited to sessions. <p> <h3>Atomicity</h3> All mbean methods are atomic. The operation will either succeed or will not have an effect. <h3>Creating, discarding or activating session</h3> See documentation for <A HREF="../../../../../../com/bea/wli/sb/management/configuration/SessionManagementMBean.html" title="interface in com.bea.wli.sb.management.configuration"><CODE>SessionManagementMBean</CODE></A>. <h3>Obtaining and using ALSBConfigurationMBean</h3> See documentation for <A HREF="../../../../../../com/bea/wli/sb/management/configuration/SessionManagementMBean.html" title="interface in com.bea.wli.sb.management.configuration"><CODE>SessionManagementMBean</CODE></A>. <h2> Importing and exporting configuration</h2> The following code sample shows how to import and export configuration data using the new API.<p> <pre> /** // Imports a configuration jar file, applies customization, activates it and exports the resources again // @throws Exception /static private void simpleImportExport(String importFileName, String passphrase) throws Exception { SessionManagementMBean sm = ... // obtain the mbean to create a session; // obtain the raw bytes that make up the configuration jar file File importFile = new File(importFileName); byte[] bytes = readBytes(importFile); // create a session String sessionName = "session." + System.currentTimeMillis(); sm.createSession(sessionName); // obtain the ALSBConfigurationMBean that operates on the // session that has just been created ALSBConfigurationMBean alsbSession = getConfigMBean(sessionName); // import configuration into the session. First we upload the // jar file, which will stage it temporarily. alsbSession.uploadJarFile(bytes); // then get the default import plan and modify the plan if required ALSBJarInfo jarInfo = alsbSession.getImportJarInfo() ALSBImportPlan importPlan = jarInfo.getDefaultImportPlan(); // Modify the plan if required and pass it to importUploaeded method ImportResult result = alsbSession.importUploaded(importPlan); // Pass null to importUploaded method to mean the default import plan. //ImportResult result = alsbSession.importUploaded(null); // print out status if (result.getImported().size() > 0) {     System.out.println("The following resources have been successfully imported.");     for (Ref ref : result.getImported()) {         System.out.println("\t" + ref);     } } if (result.getFailed().size() > 0) {     System.out.println("The following resources have failed to be imported.");     for (Map.Entry<Ref, Diagnostics> e : result.getFailed().entrySet()) {         Ref ref = e.getKey();         // Diagnostics object contains validation errors         // that caused the failure to import this resource         Diagnostics d = e.getValue();         System.out.println("\t" + ref + ". reason: " + d);     }     // discard the changes to the session and exit     System.out.println("Discarding the session.");     sm.discardSession(sessionName);     System.exit(1); } // peform the customization to assign/replace environment values and // to modify the references. ... // activate the session sm.activateSession(sessionName, "description"); // export information from the core data ALSBConfigurationMBean alsbcore = getConfigMBean(null); //export the information at project level, pass only a collection of project refs to this method byte[] contentsProj = alsbcore.exportProjects(Collections.singleton(Ref.DEFAULT_PROJECT_REF),null); // the byte contents can be saved as jar file}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -