Setting Up Liferay Portal 6.1.x EE With WebLogic 11g Managed Server Settings

This article contains a basic guide for setting up Liferay 6.1.x in Weblogic 11gR1 with Managed Servers. Please note that this is not designed to be used in every specific environment; this is merely a simple guide to setting up Liferay on Weblogic. 

Resolution

How to set up Liferay 6.1.x in Weblogic 11gR1 with Managed Servers

Requirements:

  • Liferay Portal WAR
  • Liferay Portal dependencies
  • Database connection information

Steps:

  1. Create Weblogic domain with the Configuration Wizard.
    • Set the Domain name, admin user, and password.
    • For testing purposes, all other values can be default.
    • The Domain will be referred to as "lr61" in examples.
  2. Unzip and copy the Liferay Portal dependency JARs to ../Oracle/Middleware/user_projects/domains/lr61/lib.
  3. Start the Admin Server of the domain: ../lr61/bin/startWeblogic.sh|cmd
  4. Start the Node Mananger: ../Oracle/Middleware/wlserver_10.3/server/bin/startNodeManager.sh|cmd
  5. Login to the Admin Server.
  6. Default URL is http://localhost:7001/console
Create a Machine and Managed Server and link them together.

The Machine will be referred to as "MLR61-0". The Managed Server will be referred to as "SLR61-0"

    1. In the Managed Server, go to the Server Start tab and fill in the following:
      • JDK path
      • JDK type
      • JVM arguments
    2. For testing and development purposes, assign at least 1024M.

 

The following section applies to WebLogic 10.3.2 only. For WebLogic 10.3.6 onwards, proceed to the next section

If the JNDI name method of database connection is desired, follow Step 8. 
If the JDBC method of database connection is desired, follow Step 9. 
Once completed, proceed to Step 10.

  1. Extract the weblogic.xml from the Liferay Portal WAR (The file is located at ${WAR}/WEB-INF)
  2. In the <container descriptor> section:
    Add in <prefer-web-inf-classes>true</prefer-web-inf-classes>
    Comment out the <prefer-application-packages> section.
  3. Replace the original weblogic.xml with the new file.
  4. (End of section for WebLogic 10.3.2)
  5. Deploy the WAR as an application through the Weblogic console.
  6. Default values will suffice for testing purposes.
  7. Select SLR61-0 as the target.
  8. Create a portal-ext.properties file and place it in the folder../lr61
  9. In the Admin Console, go to Services -> Data Sources and create a new Generic Data Source.
    • Give it a name like "Liferay Data Source"
    • For the JNDI Name field set "jdbc/LiferayPool"
    • Select the appropriate database connection.
    • Fill in the database name, host name, user name, and password
    • Select SLR61-0 as the target
    • Insert into portal-ext.properties: jdbc.default.jndi.name=jdbc/LiferayPool
    • Copy the appropriate connection from portal.properties into portal-ext.properties.
  10.  Add the following to portal-ext.properties:
    liferay.home=${PATH_TO_ORACLE}/Oracle/Middelware/user_projecs/domains/lr61

    auto.deploy.deploy.dir=${PATH_TO_ORACLE}/Oracle/Middleware/user_projects/domains/base_domain/deploy

    auto.deploy.weblogic.dest.dir=${PATH_TO_ORACLE}/Oracle/Middleware/user_projects/domains/base_domain/deploywar
  11. Start SLR61-0 as a server.

Additional Information

  1. liferay.home - In a Linux environment, Liferay has trouble reading the default Liferay Home value, and will insert a "../null/" path into file paths for Liferay created folders and files, and will not be able find them. By explicitly setting the liferay.home value, the Liferay generated logs and deploy folder will work.
  2. deploy.dir - This should point to the Liferay created deploy directory.
  3. weblogic.dest.dir - When a WAR file is placed in the deploy directory, it will be processed, and then a new WAR file will be created in the specified directory for deployment via the Admin Console. This process does not work if it is placed in the default "autodeploy" directory value found in the Weblogic Domain.
  4. For logs, go to ../lr61/servers/SLR610-0/logs and tail SLR61-0.out.
这篇文章有帮助吗?
0 人中有 0 人觉得有帮助