Configuring Eclipse and OEPE

The next step is to configure the Eclipse IDE so it knows about Oracle WebLogic Server's installation, the domain we created, and PrimeFaces' shared library.

Linking WebLogic's runtime environment

First, we're going to tell Eclipse where to find WebLogic's runtime environment:

  1. Launch the Eclipse IDE by running the following command:
    $MW_HOME/oepe/eclipse
    

    Or open the shortcut created by the installation process.

  2. Enter /opt/packt/workspace on the Workspace Launcher screen.
  3. Open the Preferences screen using the menu – Window → Preference.
  4. In the filter field, type server, click on the Runtime Environment entry and then the Add... button.
  5. In the new window, type 12c in the filter field, select the entry Oracle WebLogic Server 12c (12.1.2) and click on Next.
  6. Fill the field WebLogic home with the path where you installed the server—$MW_HOME/wlserver—and the other fields should be filled automatically:
    Linking WebLogic's runtime environment
  7. Click on Finish to close this window and return to the Preferences screen.

Adding a reference to the PrimeFaces' shared library

Now we're going to set up the PrimeFaces shared library, so we can reference it from our projects:

  1. On the Preferences screen, type shared to filter the entries, and click on Shared Libraries.
  2. The list of configured shared libraries is going to show up. Click on Add... to insert a new one.
  3. On the pop-up window, type in the full path of your primeSL.war file, or find it using the Browse... button.

    Tip

    The location of the file is /opt/packt/etc/primeSL/primeSL.war if you're following the book's pattern.

  4. The information we entered in the MANIFEST.MF file will be shown along with the JAR files that compose the shared library:
    Adding a reference to the PrimeFaces' shared library
  5. Click on OK to confirm the procedure, and then click on OK again on the Preferences window to close it.

Linking WebLogic Server's instance

In order to start and stop the server from within Eclipse, along other actions such as package, deploy, and debug applications using the environment, we must inform the IDE about WebLogic's configured domain and server. To accomplish this, perform the following steps:

  1. Navigate to Window | Show View | Other... and type server in the Filter field; now double-click on the Servers entry.
  2. The Servers tab is going to show up. Click on the No servers are available. Click this link to create a new server… link inside it to open the Define a New Server window.
  3. As we only have one runtime environment configured, Eclipse suggests it at the first screen. Just click on Next.
  4. Now, enter your domain path—the whole value of /$DOMAIN_HOME—and click on Finish. Here's the final configuration:
    Linking WebLogic Server's instance

    Tip

    We left the Local server type on this screen, meaning that OEPE has direct access to the server. If you need to connect to a development server, for instance, Remote is the way to go. Remember that OEPE still needs to access WebLogic Server's modules and libraries to compile your projects, so a local copy of it must be present, even though you will deploy them to a remote server.

  5. The new server is going to appear at the Servers tab. Right-click on it and select the Properties entry from the context menu.
  6. On the Properties window, click on Weblogic then Publishing, and select Publish as an exploded archive from the Publishing mode group:
    Linking WebLogic Server's instance
  7. Click on OK to close the window, and it's done.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.168.163