本文共 48065 字,大约阅读时间需要 160 分钟。
Oracle Webcenter Framework Portal Application has provided facilities to make a control over home page that you want to show once the user has accessed the Portal Framework Application URL and to which pages login and logout actions should lead.
Oracle Webcenter Framework门户应用程序提供了对用户要访问的主页进行控制的功能,一旦用户访问了Portal Framework应用程序URL,登录和注销操作应引导到哪些页面。
The Oracle Webcenter Portal Framework Application that will be resulted in by end of this practice will be deployed on Oracle Managed Server (WC_CustomPortal) instance that will be created by using Oracle Portal Template through an extension of your domain.
在本练习结束时将生成的Oracle Webcenter Portal Framework应用程序将部署在Oracle受管服务器( WC_CustomPortal )实例上,该实例将通过域扩展使用Oracle Portal Template创建。
In the previous tutorials you had deployed your Oracle Webcenter Portal Framework Application into either Oracle Webcenter WC_Spaces instance or on the JDeveloper Integrated Managed Server.
在先前的教程中,您已经将Oracle Webcenter Portal Framework应用程序部署到Oracle Webcenter WC_Spaces实例或JDeveloper Integrated Managed Server上。
While deploying your Oracle Webcenter Portal Framework Application into your JDeveloper’s Integrated Managed Server is so helpful when you were in the development stage, the deployment of your Application into pre-configured Managed Server WC_Spaces like we did in the Oracle Webcenter Portal installation at the tutorial, isn’t recommended approach by Oracle itself as such this new approach will be suggested to be used in case you’re going to deploy your Portal Application into Staging environment.
在开发阶段将Oracle Webcenter Portal Framework应用程序部署到JDeveloper的Integrated Managed Server中非常有帮助,同时将Oracle Application Server部署到预先配置的Managed Server WC_Spaces中,就像我们在教程中在Oracle Webcenter Portal安装中所做的那样。不建议Oracle自己采用这种方法,因为建议您将这种新方法用于将Portal应用程序部署到暂存环境中的情况。
Before getting started clarifying what’s the home page and how it can be changed, let me introduce you the unknown soldier index.html that’s playing major role in home page determination once Portal Application URL gets accessed.
在开始阐明什么是主页以及如何更改主页之前,让我向您介绍未知的士兵index.html ,一旦访问门户网站应用程序URL,它将在主页确定中起主要作用。
Index.html is a pure HTML page that’s located under your Portal Application’s web content folder. To find out this resource easily – by JDeveloper or by your actual folder structure, you may open your JDeveloper and point your Portal Project and make sure Group By Directory option is selected from Navigator Display Options. This would help you seeing index.html as it’s in the actual folder upon your file system.
Index.html是位于门户网站应用程序的Web内容文件夹下的纯HTML页面。 要通过JDeveloper或实际的文件夹结构轻松找到此资源,可以打开JDeveloper并指向Portal Project,并确保从Navigator Display Options中选择了Group By Directory 选项 。 这将帮助您查看index.html,就像它在文件系统上的实际文件夹中一样。
And you will be able after that from seeing index.html beneath Web Content / Public HTML resources.
之后,您将可以看到Web Content / Public HTML资源下的index.html 。
And if you get navigated into your JDeveloper user’s home folder which is actually the home of your work you will definitely see this resource just like below:
而且,如果您导航到JDeveloper用户的主文件夹(实际上是工作的主文件夹),那么您肯定会看到此资源,如下所示:
Be careful from expecting that your Portal Applications are having the same file path like i have. This is actually can be controlled and modified, so i recommend you searching about your mywork into your default profile folder beneath folder named jdeveloper.
注意不要期望您的门户网站应用程序具有与我相同的文件路径。 实际上,这是可以控制和修改的,因此,我建议您将Mywork搜索到名为jdeveloper的文件夹下的默认配置文件文件夹中。
If you were opened index.html, you may be wondering that it’s not contained a lot of codes, all what it has is just a two major meta statements.
如果打开index.html ,您可能想知道它没有包含很多代码,它所拥有的只是两个主要的meta语句。
index.html
index.html
Portal Home
And herein the technical specification that mainly helps you understanding what you did see right now:
这里的技术规范主要是帮助您了解您现在所看到的内容:
And home page defined like below in the pages.xml which is opened in the editor below
并在以下编辑器中打开的pages.xml中定义如下的主页
If you were replaced ./faces/wcnav_defaultSelection with ./faces/pages_home you will get the same result. As pages and home will refer page hierarchy component and home page defined therein respectively.
如果将./faces/wcnav_defaultSelection替换为./faces/pages_home ,您将得到相同的结果。 由于页面和主页将分别引用其中定义的页面层次结构组件和主页。
Now, let’s see how can these configurations work willingly, either by using the default index redirect or by accessing the pages_home directly.
现在,让我们看看通过使用默认索引重定向或直接访问pages_home,这些配置将如何工作。
Take into your consideration that once your Integrated Managed Server went down, your JournalDevPortal application will be removed directly. If you want to get this deployment permanently, you should deploy it through using of deployment profile (either using ear or war). As that, by starting up the Integrated Managed Server, your deployment will be right there and ready to serve.
请注意,一旦集成管理服务器出现故障,您的JournalDevPortal应用程序将被直接删除。 如果要永久进行此部署,则应使用部署配置文件(使用ear或war)进行部署。 这样一来,通过启动Integrated Managed Server,您的部署就可以在那里进行准备就绪。
You may be wondering from being the pages_home is prefixed with faces. As you may remember that Oracle Webcenter Portal Framework Application is an ADF application with Portal-features, so be sure that all pages can be accessed through JSF manner and that what you’re going to see when it comes to deal with the navigation.
您可能想知道pages_home带有面Kong前缀。 您可能还记得,Oracle Webcenter Portal Framework应用程序是具有门户功能的ADF应用程序,因此请确保可以通过JSF方式访问所有页面,并且在处理导航时会看到什么。
You may noticed that the index.html is displayed firstly and it makes a redirect into next view accordingly. This is so clear when the title of the page becomes Portal Home which is the title of index.html before showing page’s real title like Home or About.
您可能会注意到,首先显示index.html,并相应地重定向到下一视图。 当页面的标题变为Portal Home(即index.html的标题)之前,在显示页面的真实标题(如Home或About)之前,这一点非常清楚。
But you may be asking about from where index.html page is specified to be displayed firstly, the good answer will be loudly from web.xml file. Take a look inside you would see the welcome-file-list Tag listed therein:
但是您可能会询问首先从何处指定要显示index.html页,从web.xml文件中可以听到很大的答案。 看看里面,您会看到其中列出了welcome-file-list标记:
web.xml
web.xml
/index.html
And that value can be ultimately modified by two options:
最终可以通过两个选项修改该值:
JournalDev.html
JournalDev.html
JournalDev Portal
According for importance of page hierarchy component as it’s mainly the major input for the navigation model, it’s so important for you to know that navigation model treat your defined pages and their sub pages as a folder.
由于页面层次结构组件的重要性,因为它主要是导航模型的主要输入,所以让您知道导航模型将定义的页面及其子页面视为文件夹非常重要。
To leverage the concept, open your default navigation model and notice the Insert Folder Contents check box drawn beneath the Page Hierarchy element.
要利用此概念,请打开默认的导航模型,并注意在“页面层次结构”元素下方绘制的“ 插入文件夹内容”复选框。
So, what’s the Folder concept behind your pages ? to answer this questions, let’s try to enable this and disable it once again and see the difference on the JournalDev Portal Framework Application.
那么,页面背后的Folder概念是什么? 要回答这个问题,让我们尝试将其启用并再次禁用它,然后在JournalDev Portal Framework Application上查看区别。
If you get this option disabled, you’ll truly get the following below result:
如果禁用此选项,您将真正获得以下结果:
And if you clicked on the Page Hierarchy gray element, you should see your pages – elements of first level on the hierarchy – populated there.
并且,如果单击“页面层次结构”灰色元素,则应该看到页面(层次结构中第一级的元素)已在此处填充。
And if you returned back into enabling this option you would see the all pages and their sub pages displayed in a structural manner down in the hierarchy.
而且,如果您返回启用此选项,则将看到所有页面及其子页面在层次结构中以结构化方式向下显示。
In that, and once Insert Folder Contents option is enabled the Portal Framework will treat your pages as a Folders and so will populate their sub pages as a sub elements while displaying the navigation model.
这样,启用“插入文件夹内容”选项后,Portal Framework会将页面视为文件夹,因此在显示导航模型时会将其子页面填充为子元素。
As you may notice above and through using of Pretty URL, you have the ability to navigate between your pages as though you’re working with normal JSF/ADF application.
正如您可能在上面以及通过使用Pretty URL所注意到的那样,您可以在页面之间进行导航,就像使用普通的JSF / ADF应用程序一样。
Open your faces-config.xml file that’s located under your WEB-INF and look at the navigation cases listed therein:
打开位于WEB-INF下的faces-config.xml文件,并查看其中列出的导航案例:
faces-config.xml
faces-config.xml
oracle.adf.rich oracle.webcenter.portalframework.sitestructure.handler.CustomViewHandler oracle.webcenter.skin.view.SkinPhaseListener preferenceBean oracle.webcenter.portalframework.sitestructure.preference.PortalPreferences application * login_success /pages_home logout_success /pages_home
Herein below the explanation for the faces-config.xml file:
在下面的faces-config.xml文件的说明中:
According for Oracle documentation, it’s not recommended to deploy your application into pre-configured Oracle Webcenter Portal that’s already created during Oracle Webcenter Portal Installation.
根据Oracle文档,不建议将应用程序部署到在Oracle Webcenter Portal安装过程中已经创建的预配置Oracle Webcenter Portal中。
As such, from now on no need for using WC_Spaces nor for any of those ready-made Managed Servers as we already had an Integrated Managed Server for development and now we have a Custom Portal Managed Server for staging purposes.
因此,从现在开始,无需使用WC_Spaces或任何现成的受管服务器,因为我们已经具有用于开发的集成受管服务器,现在我们具有用于登台目的的定制门户受管服务器。
To prepare your Oracle Custom Portal Managed Server follow instructions below:
要准备您的Oracle Custom Portal受管服务器,请遵循以下指示:
To extend your domain, you may navigate into D:\OracleWebCenter\OracleWC\WL6Middleware\Oracle_WC\common\bin and execute the config.cmd.
要扩展您的域,您可以导航到D:\ OracleWebCenter \ OracleWC \ WL6Middleware \ Oracle_WC \ common \ bin并执行config.cmd。
Node Manager will allow you managing your servers from one point and either by using AdminServer or Oracle Webcenter Portal Enterprise Manager. From WLS home you may start your managed server. For me, it’s located on D:\OracleWebCenter\OracleWC\WL6Middleware\wlserver_10.3\server\bin
节点管理器使您可以使用AdminServer或Oracle Webcenter Portal Enterprise Manager从一个角度管理服务器。 您可以从WLS主页启动受管服务器。 对我来说,它位于D:\ OracleWebCenter \ OracleWC \ WL6Middleware \ wlserver_10.3 \ server \ bin
Both of startWeblogic.cmd & StartManagedServer.cmd be actually located under the following path D:\OracleWebCenter\OracleWC\WL6Middleware\user_projects\domains\JournalDev\bin
实际上,startWeblogic.cmd和StartManagedServer.cmd都位于以下路径D:\ OracleWebCenter \ OracleWC \ WL6Middleware \ user_projects \ domains \ JournalDev \ bin
AdminServer notification has been done through JMX and that should connect to the AdminServer for doing that. This connection may use the IPV6 which may lead for destination unreachable and so an exception like Unable to establish JMX Connectivity weblogic.management.mbeanservers.domainruntime will be thrown, preventing you from getting AdminServer notified and that will make both of AdminServer and Enterprise Manager unaware that this server is up. If you tried to deploy your Portal application into your WC_CustomPortal, it’s likely to be failed due to this notification issue. Fixing this issue needs your attention, as you should enforce your Managed Servers to get up and send their notification through using of IPv4. See Appendix A for both of startManagedServer.cmd and setDomainEnv.cmd which are modified to enforce IPv4.
AdminServer通知已经通过JMX完成,并且应该连接到AdminServer来执行此操作。 此连接可能使用IPV6,这可能会导致目标无法到达,因此将引发诸如无法建立JMX连接的异常weblogic.management.mbeanservers.domainruntime ,从而阻止您通知AdminServer,并使AdminServer和Enterprise Manager均不知道该服务器已启动。 如果您尝试将Portal应用程序部署到WC_CustomPortal中,则可能由于此通知问题而失败。 解决此问题需要引起您的注意,因为您应该强制受管服务器启动并通过使用IPv4发送其通知。 有关startManagedServer.cmd和setDomainEnv.cmd的信息,请参见附录A,这些内容已被修改以强制实施IPv4。
More about WC_CustomPortal will be in the next coming tutorials.
有关WC_CustomPortal的更多信息将在接下来的教程中。
To get your Portal Application deployed, make sure first of all you have had an established connection. To create a connection to that server, just follow below steps:
要部署您的Portal应用程序,请首先确保已建立连接。 要创建与该服务器的连接,只需执行以下步骤:
This Test actually will communicate with AdminServer to specify whether the connected server is up or not. So be careful to make sure you’re getting AdminServer up and running.
该测试实际上将与AdminServer通信,以指定所连接的服务器是否已启动。 因此,请确保您已启动并运行AdminServer。
Metadata Repository is so important concept that we’re going to explain. But you may consider it for now as a location (May be XML or database based) that’s used to define your Portal Framework Application Artifacts. Its values will be populated with MAR file which is created while deploying and it is stand for Metadata Archive File.
元数据存储库是如此重要,我们将要解释。 但是您现在可能会认为它是一个用于定义Portal Framework Application Artifacts的位置(可能是基于XML或数据库)。 它的值将使用在部署时创建的MAR文件填充,它代表Metadata Archive File。
This deployment is done on WAR level, in the next coming Tutorials, you will learn the EAR level deployment that may or may not contain the static PortalWebAssests second project.
此部署在WAR级别完成,在接下来的教程中,您将学习可能包含或可能不包含静态PortalWebAssests第二项目的EAR级别部署。
Oracle Webcenter provides facilities to modify the way in which the home page is specified. In addition for that you may also modify the page that the Portal will lead you for after success login or/and success logout. This tutorial is intended to provide you all of needed information to understand the way in which Portal Application has configured this.
Oracle Webcenter提供了一些工具来修改指定主页的方式。 除此之外,您还可以修改门户网站成功登录或/和成功注销后将引导您进入的页面。 本教程旨在为您提供所有必需的信息,以了解Portal Application对其进行配置的方式。
Also, it’s time now to prepare our staging environment and that’s happily can be done thorugh extending our domain by adding newly Custom Portal Managed server that’s already contained all of these required libraries to get Portal Application deployed successfully and ready to use.
另外,现在是时候准备我们的登台环境了,可以通过添加新的Custom Portal Managed服务器来扩展我们的域而高兴地完成,该服务器已经包含所有这些必需的库,以成功部署Portal Application并准备使用它。
This Appendix is created to help the developer by pass the connection exception that may result in when the Managed Server uses IPv6 to notify the AdminServer about its status. you may find below startDomainEnv.cmd and startManagedWeblogic.cmd updates happened upon JAVA_OPTIONS, so you may use them or edit your command files to be identical.
创建本附录旨在通过传递连接异常来帮助开发人员,该异常可能导致受管服务器使用IPv6通知AdminServer有关其状态的信息。 您可能会在下面找到在JAVA_OPTIONS上发生的startDomainEnv.cmd和startManagedWeblogic.cmd更新,因此您可以使用它们或将命令文件编辑为相同。
setDomainEnv.cmd
setDomainEnv.cmd
@ECHO OFF@REM WARNING: This file is created by the Configuration Wizard.@REM Any changes to this script may be lost when adding extensions to this configuration.@REM *************************************************************************@REM This script is used to setup the needed environment to be able to start Weblogic Server in this domain.@REM @REM This script initializes the following variables before calling commEnv to set other variables:@REM @REM WL_HOME - The BEA home directory of your WebLogic installation.@REM JAVA_VM - The desired Java VM to use. You can set this environment variable before calling@REM this script to switch between Sun or BEA or just have the default be set. @REM JAVA_HOME - Location of the version of Java used to start WebLogic@REM Server. Depends directly on which JAVA_VM value is set by default or by the environment.@REM USER_MEM_ARGS - The variable to override the standard memory arguments@REM passed to java.@REM PRODUCTION_MODE - The variable that determines whether Weblogic Server is started in production mode.@REM DOMAIN_PRODUCTION_MODE @REM - The variable that determines whether the workshop related settings like the debugger,@REM testconsole or iterativedev should be enabled. ONLY settable using the @REM command-line parameter named production@REM NOTE: Specifying the production command-line param will force @REM the server to start in production mode.@REM @REM Other variables used in this script include:@REM SERVER_NAME - Name of the weblogic server.@REM JAVA_OPTIONS - Java command-line options for running the server. (These@REM will be tagged on to the end of the JAVA_VM and@REM MEM_ARGS)@REM @REM For additional information, refer to "Managing Server Startup and Shutdown for Oracle WebLogic Server"@REM (https://download.oracle.com/docs/cd/E23943_01/web.1111/e13708/overview.htm).@REM *************************************************************************set COMMON_COMPONENTS_HOME=D:\OracleWebCenter\OracleWC\WL6Middleware\oracle_commonfor %%i in ("%COMMON_COMPONENTS_HOME%") do set COMMON_COMPONENTS_HOME=%%~fsiset UCM_ORACLE_HOME=D:\OracleWebCenter\OracleWC\WL6Middleware\Oracle_ECMfor %%i in ("%UCM_ORACLE_HOME%") do set UCM_ORACLE_HOME=%%~fsiset IRM_ORACLE_HOME=D:\OracleWebCenter\OracleWC\WL6Middleware\Oracle_ECMset WC_ORACLE_HOME=D:\OracleWebCenter\OracleWC\WL6Middleware\Oracle_WCset APPLICATIONS_DIRECTORY=D:\OracleWebCenter\OracleWC\WL6Middleware\user_projects\applications\JournalDevset WC_ORACLE_HOME=D:\OracleWebCenter\OracleWC\WL6Middleware\Oracle_WCset WCPS_ORACLE_HOME=D:\OracleWebCenter\OracleWC\WL6Middleware\Oracle_WCset PORTLET_ORACLE_HOME=D:\OracleWebCenter\OracleWC\WL6Middleware\oracle_commonset WC_ORACLE_HOME=D:\OracleWebCenter\OracleWC\WL6Middleware\Oracle_WCset WL_HOME=D:\OracleWebCenter\OracleWC\WL6Middleware\wlserver_10.3for %%i in ("%WL_HOME%") do set WL_HOME=%%~fsiset BEA_JAVA_HOME=D:\OracleWebCenter\OracleWC\WL6Middleware\jrockit_160_29_D1.2.0-10set SUN_JAVA_HOME=D:\OracleWebCenter\OracleWC\WL6Middleware\jdk160_29if "%JAVA_VENDOR%"=="Oracle" ( set JAVA_HOME=%BEA_JAVA_HOME%) else ( if "%JAVA_VENDOR%"=="Sun" ( set JAVA_HOME=%SUN_JAVA_HOME% ) else ( set JAVA_VENDOR=Sun set JAVA_HOME=D:\OracleWebCenter\OracleWC\WL6Middleware\jdk160_29 ))@REM We need to reset the value of JAVA_HOME to get it shortened AND @REM we can not shorten it above because immediate variable expansion will blank itset JAVA_HOME=%JAVA_HOME%for %%i in ("%JAVA_HOME%") do set JAVA_HOME=%%~fsiset SAMPLES_HOME=%WL_HOME%\samplesset DOMAIN_HOME=D:\OracleWebCenter\OracleWC\WL6Middleware\user_projects\domains\JournalDevfor %%i in ("%DOMAIN_HOME%") do set DOMAIN_HOME=%%~fsiset LONG_DOMAIN_HOME=D:\OracleWebCenter\OracleWC\WL6Middleware\user_projects\domains\JournalDevif "%DEBUG_PORT%"=="" ( set DEBUG_PORT=8453)if "%SERVER_NAME%"=="" ( set SERVER_NAME=AdminServer)set DERBY_FLAG=falseset enableHotswapFlag=set PRODUCTION_MODE=set doExitFlag=falseset verboseLoggingFlag=falsefor %%p in (%*) do call :SET_PARAM %%pGOTO :CMD_LINE_DONE :SET_PARAM for %%q in (%1) do set noQuotesParam=%%~q if /i "%noQuotesParam%" == "nodebug" ( set debugFlag=false GOTO :EOF ) if /i "%noQuotesParam%" == "production" ( set DOMAIN_PRODUCTION_MODE=true GOTO :EOF ) if /i "%noQuotesParam%" == "notestconsole" ( set testConsoleFlag=false GOTO :EOF ) if /i "%noQuotesParam%" == "noiterativedev" ( set iterativeDevFlag=false GOTO :EOF ) if /i "%noQuotesParam%" == "noLogErrorsToConsole" ( set logErrorsToConsoleFlag=false GOTO :EOF ) if /i "%noQuotesParam%" == "noderby" ( set DERBY_FLAG=false GOTO :EOF ) if /i "%noQuotesParam%" == "doExit" ( set doExitFlag=true GOTO :EOF ) if /i "%noQuotesParam%" == "noExit" ( set doExitFlag=false GOTO :EOF ) if /i "%noQuotesParam%" == "verbose" ( set verboseLoggingFlag=true GOTO :EOF ) if /i "%noQuotesParam%" == "enableHotswap" ( set enableHotswapFlag=-javaagent:%WL_HOME%\server\lib\diagnostics-agent.jar GOTO :EOF ) else ( set PROXY_SETTINGS=%PROXY_SETTINGS% %1 ) GOTO :EOF:CMD_LINE_DONEset MEM_DEV_ARGS=if "%DOMAIN_PRODUCTION_MODE%"=="true" ( set PRODUCTION_MODE=%DOMAIN_PRODUCTION_MODE%)if "%PRODUCTION_MODE%"=="true" ( set debugFlag=false set testConsoleFlag=false set iterativeDevFlag=false set logErrorsToConsoleFlag=false)@REM If you want to override the default Patch Classpath, Library Path and Path for this domain,@REM Please uncomment the following lines and add a valid value for the environment variables@REM set PATCH_CLASSPATH=[myPatchClasspath] (windows)@REM set PATCH_LIBPATH=[myPatchLibpath] (windows)@REM set PATCH_PATH=[myPatchPath] (windows)@REM PATCH_CLASSPATH=[myPatchClasspath] (unix)@REM PATCH_LIBPATH=[myPatchLibpath] (unix)@REM PATCH_PATH=[myPatchPath] (unix)call "%WL_HOME%\common\bin\commEnv.cmd"set WLS_HOME=%WL_HOME%\serverset XMS_SUN_64BIT=256set XMS_SUN_32BIT=256set XMX_SUN_64BIT=512set XMX_SUN_32BIT=512set XMS_JROCKIT_64BIT=256set XMS_JROCKIT_32BIT=256set XMX_JROCKIT_64BIT=512set XMX_JROCKIT_32BIT=512set XMS_SUN_64BIT=512set XMS_SUN_32BIT=512set XMX_SUN_64BIT=1024set XMX_SUN_32BIT=1024set XMS_JROCKIT_64BIT=512set XMS_JROCKIT_32BIT=512set XMX_JROCKIT_64BIT=1024set XMX_JROCKIT_32BIT=1024set XMS_SUN_64BIT=512set XMS_SUN_32BIT=512set XMX_SUN_64BIT=1024set XMX_SUN_32BIT=1024set XMS_JROCKIT_64BIT=512set XMS_JROCKIT_32BIT=512set XMX_JROCKIT_64BIT=1024set XMX_JROCKIT_32BIT=1024if "%JAVA_VENDOR%"=="Sun" ( set WLS_MEM_ARGS_64BIT=-Xms256m -Xmx512m set WLS_MEM_ARGS_32BIT=-Xms256m -Xmx512m) else ( set WLS_MEM_ARGS_64BIT=-Xms512m -Xmx512m set WLS_MEM_ARGS_32BIT=-Xms512m -Xmx512m)if "%JAVA_VENDOR%"=="Oracle" ( set CUSTOM_MEM_ARGS_64BIT=-Xms%XMS_JROCKIT_64BIT%m -Xmx%XMX_JROCKIT_64BIT%m set CUSTOM_MEM_ARGS_32BIT=-Xms%XMS_JROCKIT_32BIT%m -Xmx%XMX_JROCKIT_32BIT%m) else ( set CUSTOM_MEM_ARGS_64BIT=-Xms%XMS_SUN_64BIT%m -Xmx%XMX_SUN_64BIT%m set CUSTOM_MEM_ARGS_32BIT=-Xms%XMS_SUN_32BIT%m -Xmx%XMX_SUN_32BIT%m)set MEM_ARGS_64BIT=%CUSTOM_MEM_ARGS_64BIT%set MEM_ARGS_32BIT=%CUSTOM_MEM_ARGS_32BIT%if "%JAVA_USE_64BIT%"=="true" ( set MEM_ARGS=%MEM_ARGS_64BIT%) else ( set MEM_ARGS=%MEM_ARGS_32BIT%)set MEM_PERM_SIZE_64BIT=-XX:PermSize=128mset MEM_PERM_SIZE_32BIT=-XX:PermSize=128mif "%JAVA_USE_64BIT%"=="true" ( set MEM_PERM_SIZE=%MEM_PERM_SIZE_64BIT%) else ( set MEM_PERM_SIZE=%MEM_PERM_SIZE_32BIT%)set MEM_MAX_PERM_SIZE_64BIT=-XX:MaxPermSize=512mset MEM_MAX_PERM_SIZE_32BIT=-XX:MaxPermSize=512mif "%JAVA_USE_64BIT%"=="true" ( set MEM_MAX_PERM_SIZE=%MEM_MAX_PERM_SIZE_64BIT%) else ( set MEM_MAX_PERM_SIZE=%MEM_MAX_PERM_SIZE_32BIT%)if "%JAVA_VENDOR%"=="Sun" ( if "%PRODUCTION_MODE%"=="" ( set MEM_DEV_ARGS=-XX:CompileThreshold=8000 %MEM_PERM_SIZE% ))@REM Had to have a separate test here BECAUSE of immediate variable expansion on windowsif "%JAVA_VENDOR%"=="Sun" ( set MEM_ARGS=%MEM_ARGS% %MEM_DEV_ARGS% %MEM_MAX_PERM_SIZE%)if "%JAVA_VENDOR%"=="HP" ( set MEM_ARGS=%MEM_ARGS% %MEM_MAX_PERM_SIZE%)if "%JAVA_VENDOR%"=="Apple" ( set MEM_ARGS=%MEM_ARGS% %MEM_MAX_PERM_SIZE%)@REM IF USER_MEM_ARGS the environment variable is set, use it to override ALL MEM_ARGS valuesif NOT "%USER_MEM_ARGS%"=="" ( set MEM_ARGS=%USER_MEM_ARGS%)set ORACLE_DOMAIN_CONFIG_DIR=%DOMAIN_HOME%\config\fmwconfigfor %%i in ("%ORACLE_DOMAIN_CONFIG_DIR%") do set ORACLE_DOMAIN_CONFIG_DIR=%%~fsiset WLS_JDBC_REMOTE_ENABLED=-Dweblogic.jdbc.remoteEnabled=falseif "%WC_OHOME_ARGUMENT%"=="" ( set WC_OHOME_ARGUMENT=-Dwc.oracle.home=%WC_ORACLE_HOME% set EXTRA_JAVA_PROPERTIES=-Dwc.oracle.home=%WC_ORACLE_HOME% %EXTRA_JAVA_PROPERTIES%)if "%WC_OHOME_ARGUMENT%"=="" ( set WC_OHOME_ARGUMENT=-Dwc.oracle.home=%WC_ORACLE_HOME% set EXTRA_JAVA_PROPERTIES=-Dwc.oracle.home=%WC_ORACLE_HOME% %EXTRA_JAVA_PROPERTIES%)if "%PORTLET_OHOME_ARGUMENT%"=="" ( set PORTLET_OHOME_ARGUMENT=-Dportlet.oracle.home=%PORTLET_ORACLE_HOME% set EXTRA_JAVA_PROPERTIES=-Dportlet.oracle.home=%PORTLET_ORACLE_HOME% %EXTRA_JAVA_PROPERTIES%)if "%WC_OHOME_ARGUMENT%"=="" ( set WC_OHOME_ARGUMENT=-Dwc.oracle.home=%WC_ORACLE_HOME% set EXTRA_JAVA_PROPERTIES=-Dwc.oracle.home=%WC_ORACLE_HOME% %EXTRA_JAVA_PROPERTIES%)set JAVA_PROPERTIES=-Dplatform.home=%WL_HOME% -Dwls.home=%WLS_HOME% -Dweblogic.home=%WLS_HOME% set ALT_TYPES_DIR=%COMMON_COMPONENTS_HOME%\modules\oracle.ossoiap_11.1.1,%COMMON_COMPONENTS_HOME%\modules\oracle.oamprovider_11.1.1,%COMMON_COMPONENTS_HOME%\modules\oracle.jps_11.1.1set PROTOCOL_HANDLERS=oracle.mds.net.protocolif "%JAVA_VENDOR%"=="Sun" ( set EXTRA_JAVA_PROPERTIES=-XX:+UseParallelGC -XX:+DisableExplicitGC %EXTRA_JAVA_PROPERTIES%) else ( if "%JAVA_VENDOR%"=="Oracle" ( set EXTRA_JAVA_PROPERTIES=-Djrockit.codegen.newlockmatching=true %EXTRA_JAVA_PROPERTIES% ) else ( set EXTRA_JAVA_PROPERTIES=-XX:+UseParallelGC -XX:+DisableExplicitGC %EXTRA_JAVA_PROPERTIES% ))set PROTOCOL_HANDLERS=%PROTOCOL_HANDLERS:;="|"%@REM To use Java Authorization Contract for Containers (JACC) in this domain, @REM please uncomment the following section. If there are multiple machines in @REM your domain, be sure to edit the setDomainEnv in the associated domain on @REM each machine.@REM @REM -Djava.security.manager@REM -Djava.security.policy=location of weblogic.policy@REM -Djavax.security.jacc.policy.provider=weblogic.security.jacc.simpleprovider.SimpleJACCPolicy@REM -Djavax.security.jacc.PolicyConfigurationFactory.provider=weblogic.security.jacc.simpleprovider.PolicyConfigurationFactoryImpl@REM -Dweblogic.security.jacc.RoleMapperFactory.provider=weblogic.security.jacc.simpleprovider.RoleMapperFactoryImplif "%JAVA_VENDOR%"=="Oracle" ( set EXTRA_JAVA_PROPERTIES=-XX:+UseLargePagesForHeap %EXTRA_JAVA_PROPERTIES%)set EXTRA_JAVA_PROPERTIES=-Doracle.webcenter.tagging.scopeTags=false %EXTRA_JAVA_PROPERTIES%set EXTRA_JAVA_PROPERTIES=-Djava.awt.headless=true %EXTRA_JAVA_PROPERTIES%set EXTRA_JAVA_PROPERTIES=%EXTRA_JAVA_PROPERTIES% -Dipm.oracle.home=D:\OracleWebCenter\OracleWC\WL6Middleware\Oracle_ECMset EXTRA_JAVA_PROPERTIES=%EXTRA_JAVA_PROPERTIES% -Doracle.capture.home=D:\OracleWebCenter\OracleWC\WL6Middleware\Oracle_ECMset EXTRA_JAVA_PROPERTIES=%EXTRA_JAVA_PROPERTIES% -Ducm.oracle.home=%UCM_ORACLE_HOME%set EXTRA_JAVA_PROPERTIES=%EXTRA_JAVA_PROPERTIES% -Dirm.oracle.home=%IRM_ORACLE_HOME%set EXTRA_JAVA_PROPERTIES=-Doracle.webcenter.tagging.scopeTags=false %EXTRA_JAVA_PROPERTIES%set EXTRA_JAVA_PROPERTIES=-Doracle.webcenter.analytics.disable-native-partitioning=false %EXTRA_JAVA_PROPERTIES%set EXTRA_JAVA_PROPERTIES=-DUSE_JAAS=false -Djps.policystore.hybrid.mode=false -Djps.combiner.optimize.lazyeval=true -Djps.combiner.optimize=true -Djps.auth=ACC -Doracle.core.ojdl.logging.usercontextprovider=oracle.core.ojdl.logging.impl.UserContextImpl %EXTRA_JAVA_PROPERTIES%set EXTRA_JAVA_PROPERTIES=%EXTRA_JAVA_PROPERTIES% -Dem.oracle.home=D:\OracleWebCenter\OracleWC\WL6Middleware\oracle_common -Djava.awt.headless=trueset EXTRA_JAVA_PROPERTIES=-Dtangosol.coherence.log=jdk -DjiveHome=%DOMAIN_HOME%\config\fmwconfig\servers\%SERVER_NAME%\owc_discussions %EXTRA_JAVA_PROPERTIES%set EXTRA_JAVA_PROPERTIES=-Djps.auth.debug=false %EXTRA_JAVA_PROPERTIES%set EXTRA_JAVA_PROPERTIES=-Dcommon.components.home=%COMMON_COMPONENTS_HOME% -Djrf.version=11.1.1 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Ddomain.home=%DOMAIN_HOME% -Djrockit.optfile=%COMMON_COMPONENTS_HOME%\modules\oracle.jrf_11.1.1\jrocket_optfile.txt -Doracle.server.config.dir=%ORACLE_DOMAIN_CONFIG_DIR%\servers\%SERVER_NAME% -Doracle.domain.config.dir=%ORACLE_DOMAIN_CONFIG_DIR% -Digf.arisidbeans.carmlloc=%ORACLE_DOMAIN_CONFIG_DIR%\carml -Digf.arisidstack.home=%ORACLE_DOMAIN_CONFIG_DIR%\arisidprovider -Doracle.security.jps.config=%DOMAIN_HOME%\config\fmwconfig\jps-config.xml -Doracle.deployed.app.dir=%DOMAIN_HOME%\servers\%SERVER_NAME%\tmp\_WL_user -Doracle.deployed.app.ext=\- -Dweblogic.alternateTypesDirectory=%ALT_TYPES_DIR% -Djava.protocol.handler.pkgs=%PROTOCOL_HANDLERS% %WLS_JDBC_REMOTE_ENABLED% %EXTRA_JAVA_PROPERTIES%set JAVA_PROPERTIES=%JAVA_PROPERTIES% %EXTRA_JAVA_PROPERTIES%set ARDIR=%WL_HOME%\server\libpushd %LONG_DOMAIN_HOME%@REM Clustering support (edit for your cluster!)if "%ADMIN_URL%"=="" ( @REM The then part of this block is telling us we are either starting an admin server OR we are non-clustered set CLUSTER_PROPERTIES=-Dweblogic.management.discover=true) else ( set CLUSTER_PROPERTIES=-Dweblogic.management.discover=false -Dweblogic.management.server=%ADMIN_URL%)if NOT "%LOG4J_CONFIG_FILE%"=="" ( set JAVA_PROPERTIES=%JAVA_PROPERTIES% -Dlog4j.configuration=file:%LOG4J_CONFIG_FILE%)set JAVA_PROPERTIES=%JAVA_PROPERTIES% %CLUSTER_PROPERTIES%set JAVA_DEBUG=if "%debugFlag%"=="true" ( set JAVA_DEBUG=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=%DEBUG_PORT%,server=y,suspend=n -Djava.compiler=NONE set JAVA_OPTIONS=%JAVA_OPTIONS% %enableHotswapFlag% -Djava.net.preferIPv4Stack=true -ea -da:com.bea... -da:javelin... -da:weblogic... -ea:com.bea.wli... -ea:com.bea.broker... -ea:com.bea.sbconsole...) else ( set JAVA_OPTIONS=%JAVA_OPTIONS% %enableHotswapFlag% -da -Djava.net.preferIPv4Stack=true)if NOT exist %JAVA_HOME%\lib ( echo The JRE was not found in directory %JAVA_HOME%. ^(JAVA_HOME^) echo Please edit your environment and set the JAVA_HOME echo variable to point to the root directory of your Java installation. popd pause GOTO :EOF)if "%DERBY_FLAG%"=="true" ( set DATABASE_CLASSPATH=%DERBY_CLASSPATH%) else ( set DATABASE_CLASSPATH=%DERBY_CLIENT_CLASSPATH%)if NOT "%POST_CLASSPATH%"=="" ( set POST_CLASSPATH=%COMMON_COMPONENTS_HOME%\modules\oracle.jrf_11.1.1\jrf.jar;%POST_CLASSPATH%) else ( set POST_CLASSPATH=%COMMON_COMPONENTS_HOME%\modules\oracle.jrf_11.1.1\jrf.jar)if NOT "%PRE_CLASSPATH%"=="" ( set PRE_CLASSPATH=%COMMON_COMPONENTS_HOME%\modules\oracle.jdbc_11.1.1\ojdbc6dms.jar;%PRE_CLASSPATH%) else ( set PRE_CLASSPATH=%COMMON_COMPONENTS_HOME%\modules\oracle.jdbc_11.1.1\ojdbc6dms.jar)if "%PORTLET_ORACLE_HOME%"=="" ( set POST_CLASSPATH=%WC_ORACLE_HOME%\webcenter\modules\oracle.portlet.server_11.1.1\oracle-portlet-api.jar;%POST_CLASSPATH%)set POST_CLASSPATH=%WCPS_ORACLE_HOME%\wcps-services-app\modules\oracle.wcps_11.1.1\wcps-connection-mbeans.jar;%POST_CLASSPATH%set POST_CLASSPATH=%PORTLET_ORACLE_HOME%\webcenter\modules\oracle.portlet.server_11.1.1\oracle-portlet-api.jar;%POST_CLASSPATH%set POST_CLASSPATH=%COMMON_COMPONENTS_HOME%\soa\modules\commons-cli-1.1.jar;%COMMON_COMPONENTS_HOME%\soa\modules\oracle.soa.mgmt_11.1.1\soa-infra-mgmt.jar;%POST_CLASSPATH%if NOT "%DATABASE_CLASSPATH%"=="" ( if NOT "%POST_CLASSPATH%"=="" ( set POST_CLASSPATH=%POST_CLASSPATH%;%DATABASE_CLASSPATH% ) else ( set POST_CLASSPATH=%DATABASE_CLASSPATH% ))if NOT "%ARDIR%"=="" ( if NOT "%POST_CLASSPATH%"=="" ( set POST_CLASSPATH=%POST_CLASSPATH%;%ARDIR%\xqrl.jar ) else ( set POST_CLASSPATH=%ARDIR%\xqrl.jar ))@REM PROFILING SUPPORTset JAVA_PROFILE=set SERVER_CLASS=weblogic.Serverset JAVA_PROPERTIES=%JAVA_PROPERTIES% %WLP_JAVA_PROPERTIES%set JAVA_OPTIONS=%JAVA_OPTIONS% %JAVA_PROPERTIES% -Djava.net.preferIPv4Stack=true -Dwlw.iterativeDev=%iterativeDevFlag% -Dwlw.testConsole=%testConsoleFlag% -Dwlw.logErrorsToConsole=%logErrorsToConsoleFlag%if "%PRODUCTION_MODE%"=="true" ( set JAVA_OPTIONS= -Djava.net.preferIPv4Stack=true -Dweblogic.ProductionModeEnabled=true %JAVA_OPTIONS%)@REM -- Setup properties so that we can save stdout and stderr to filesif NOT "%WLS_STDOUT_LOG%"=="" ( echo Logging WLS stdout to %WLS_STDOUT_LOG% set JAVA_OPTIONS=%JAVA_OPTIONS% -Djava.net.preferIPv4Stack=true -Dweblogic.Stdout=%WLS_STDOUT_LOG%)if NOT "%WLS_STDERR_LOG%"=="" ( echo Logging WLS stderr to %WLS_STDERR_LOG% set JAVA_OPTIONS=%JAVA_OPTIONS% -Djava.net.preferIPv4Stack=true -Dweblogic.Stderr=%WLS_STDERR_LOG%)@REM ADD EXTENSIONS TO CLASSPATHSif NOT "%EXT_PRE_CLASSPATH%"=="" ( if NOT "%PRE_CLASSPATH%"=="" ( set PRE_CLASSPATH=%EXT_PRE_CLASSPATH%;%PRE_CLASSPATH% ) else ( set PRE_CLASSPATH=%EXT_PRE_CLASSPATH% ))set POST_CLASSPATH=%POST_CLASSPATH%;%UCM_ORACLE_HOME%\ucm\idc\jlib\idcloader.jar;%UCM_ORACLE_HOME%\ucm\idc\components\NativeOsUtils\classes-NativeOsUtils.jarcall "%UCM_ORACLE_HOME%\ucm\idc\bin\idcCommEnv.cmd"if NOT "%EXT_POST_CLASSPATH%"=="" ( if NOT "%POST_CLASSPATH%"=="" ( set POST_CLASSPATH=%POST_CLASSPATH%;%EXT_POST_CLASSPATH% ) else ( set POST_CLASSPATH=%EXT_POST_CLASSPATH% ))if NOT "%WEBLOGIC_EXTENSION_DIRS%"=="" ( set JAVA_OPTIONS=%JAVA_OPTIONS% -Djava.net.preferIPv4Stack=true -Dweblogic.ext.dirs=%WEBLOGIC_EXTENSION_DIRS%)set JAVA_OPTIONS=%JAVA_OPTIONS% -Djava.net.preferIPv4Stack=true@REM SET THE CLASSPATHif NOT "%WLP_POST_CLASSPATH%"=="" ( if NOT "%CLASSPATH%"=="" ( set CLASSPATH=%WLP_POST_CLASSPATH%;%CLASSPATH% ) else ( set CLASSPATH=%WLP_POST_CLASSPATH% ))if NOT "%POST_CLASSPATH%"=="" ( if NOT "%CLASSPATH%"=="" ( set CLASSPATH=%POST_CLASSPATH%;%CLASSPATH% ) else ( set CLASSPATH=%POST_CLASSPATH% ))if NOT "%WEBLOGIC_CLASSPATH%"=="" ( if NOT "%CLASSPATH%"=="" ( set CLASSPATH=%WEBLOGIC_CLASSPATH%;%CLASSPATH% ) else ( set CLASSPATH=%WEBLOGIC_CLASSPATH% ))if NOT "%PRE_CLASSPATH%"=="" ( set CLASSPATH=%PRE_CLASSPATH%;%CLASSPATH%)if NOT "%JAVA_VENDOR%"=="BEA" ( set JAVA_VM=%JAVA_VM% %JAVA_DEBUG% %JAVA_PROFILE%) else ( set JAVA_VM=%JAVA_VM% %JAVA_DEBUG% %JAVA_PROFILE%)
startManagedWeblogic.cmd
startManagedWeblogic.cmd
@ECHO OFF@REM WARNING: This file is created by the Configuration Wizard.@REM Any changes to this script may be lost when adding extensions to this configuration.SETLOCAL@REM --- Start Functions ---GOTO :ENDFUNCTIONS:usage echo Need to set SERVER_NAME and ADMIN_URL environment variables or specify echo them in command line: echo Usage: %1 SERVER_NAME {ADMIN_URL} echo for example: echo %1 managedserver1 https://mohammad-amr-lt:7001GOTO :EOF:ENDFUNCTIONS@REM --- End Functions ---@REM *************************************************************************@REM This script is used to start a managed WebLogic Server for the domain in@REM the current working directory. This script can either read in the SERVER_NAME and@REM ADMIN_URL as positional parameters or will read them from environment variables that are @REM set before calling this script. If SERVER_NAME is not sent as a parameter or exists with a value@REM as an environment variable the script will EXIT. If the ADMIN_URL value cannot be determined@REM by reading a parameter or from the environment a default value will be used.@REM @REM For additional information, refer to "Managing Server Startup and Shutdown for Oracle WebLogic Server"@REM (https://download.oracle.com/docs/cd/E23943_01/web.1111/e13708/overview.htm)@REM *************************************************************************@REM Set SERVER_NAME to the name of the server you wish to start up.set DOMAIN_NAME=JournalDevset ADMIN_URL=https://mohammad-amr-lt:7001@REM Set WLS_USER equal to your system username and WLS_PW equal @REM to your system password for no username and password prompt @REM during server startup. Both are required to bypass the startup@REM prompt.set WLS_USER=set WLS_PW=@REM Set JAVA_OPTIONS to the java flags you want to pass to the vm. i.e.: @REM set JAVA_OPTIONS=-Dweblogic.attribute=value -Djava.attribute=valueset JAVA_OPTIONS=-Djava.net.preferIPv4Stack=true -Dweblogic.security.SSL.trustedCAKeyStore="D:\OracleWebCenter\OracleWC\WL6Middleware\wlserver_10.3\server\lib\cacerts" %JAVA_OPTIONS%@REM Set JAVA_VM to the java virtual machine you want to run. For instance:@REM set JAVA_VM=-serverset JAVA_VM=@REM Set SERVER_NAME and ADMIN_URL, they must by specified before starting@REM a managed server, detailed information can be found at@REM https://download.oracle.com/docs/cd/E23943_01/web.1111/e13708/overview.htmif "%1"=="" ( if "%SERVER_NAME%"=="" ( CALL :usage %0 GOTO :EOF )) else ( set SERVER_NAME=%1 shift)if "%1"=="" ( if "%ADMIN_URL%"=="" ( CALL :usage %0 GOTO :EOF )) else ( set ADMIN_URL=%1 shift)@REM Export the admin_url whether the user specified it OR it was sent on the command-lineset ADMIN_URL=%ADMIN_URL%set SERVER_NAME=%SERVER_NAME%set DOMAIN_HOME=D:\OracleWebCenter\OracleWC\WL6Middleware\user_projects\domains\JournalDevif "%1"=="" ( @REM Call Weblogic Server with our default params since the user did not specify any other ones call "%DOMAIN_HOME%\bin\startWebLogic.cmd" nodebug noderby noiterativedev notestconsole noLogErrorsToConsole) else ( @REM Call Weblogic Server with the params the user sent in INSTEAD of the defaults call "%DOMAIN_HOME%\bin\startWebLogic.cmd" %1 %2 %3 %4 %5 %6 %7 %8 %9)ENDLOCAL
翻译自:
转载地址:http://hqlzd.baihongyu.com/