Creating a New WebLogic Server Domain

In this section, we outline the steps to create a new domain, thereby creating an environment to host your Web and enterprise components.

Like most people, the first thing you probably did after installing WebLogic 8.1 was to start it up to see how it works. You probably did this by starting either the MedRec application (which includes the Getting Started application) or the examples server. In case you've been looking for them, they're tucked away under the %BEA_HOME%weblogic81samplesserver directory of your WebLogic 8 installation. That isn't a very convenient location for your own applications.

In the following steps, we'll create a new domain and default Web application directory.

Domain Creation with the Configuration Wizard

WebLogic Server 8.1 improves on previous versions by making domain creation and management easier than ever. To create a domain in WebLogic 7, you had to go through the Administration Console of a domain that was set up at installation by default, such as the mydomain or MedRec domain. This merely created a new domain directory with a bare-bones config.xml file. You still had to copy the SerializedSystemIni.dat, fileRealm.properties, setEnv.cmd, and startWebLogic.cmd files into your new domain directory from an existing domain directory, and then edit those command files with the new domain parameters. WebLogic Server 8.1 introduced a new utility, the Configuration Wizard, which made domain creation simple and efficient. You could still create domains through the Administration Console, but I'm sure that after you use the Configuration Wizard, you wouldn't want to create domains in any other way.

WebLogic Server 8.1 ships with a drastically improved version of the Configuration Wizard. It includes many new options for not only creating your domain, but also for customizing your server settings, such as JDBC pools, JMS queues, managed servers, and so on. We'll explore each of these options in greater detail in this appendix.

The Configuration Wizard contains templates that help you to create new domains or to extend existing domains by adding managed servers. The Configuration Wizard runs in both a GUI mode and a Console mode, but for expediency's sake, we'll look at the GUI mode for our example:

1.
Start the Configuration Wizard utility. For Windows, navigate from the Start button:

Start→Programs→BEA WebLogic Platform 8.1→Configuration Wizard

For Unix users, open a command-line shell and navigate to the commonin subdirectory of the WebLogic Server installation and run the dmwiz.sh script.

2.
The Configuration Wizard GUI application starts and displays a form to choose a template and name for your new domain, as shown in Figure A.1.

Figure A.1. The first form of the Configuration Wizard asks you to create a new domain or add to an existing domain.


3.
Select Create a New WebLogic Configuration and click on Next to go to the next screen.

The next form enables you to choose what type of domain you want to create. Select the Basic WebLogic Server Domain as shown in Figure A.2 and click on Next.

Figure A.2. Choose a domain configuration.


4.
You now see a screen shown in Figure A.3 below that shows you an Express option and a Custom option. The Express option is a subset of the Custom option. We'll walk through the Custom Configuration option.

Figure A.3. Express or customized configuration.


5.
On the next screen as shown in Figure A.4, you define the name and ports for your WebLogic Server instance. We'll leave these as the default settings.

Figure A.4. Administration server configuration.


6.
You're now presented with an option to configure multiple servers, define your cluster, and so on. This is shown in Figure A.5. For now, just select Skip and move on by clicking Next. If you want to set up a cluster, refer to page 1219.

Figure A.5. Server and cluster choices.


7.
The screen shown in Figure A.6 asks whether you want to configure your JDBC components. We'll walk through this, so select Yes and click Next.

Figure A.6. JDBC options.


8.
Click Add to add a new JDBC connection pool and specify its properties. An example is shown in Figure A.7. There are drop-down menus to help you with the driver settings and URL. Click Next.

Figure A.7. JDBC connection pool settings.


9.
The next screen as shown in Figure A.8 enables you to set up multipools. We'll ignore this for now. Click Next.

Figure A.8. JDBC multipool configuration.


10.
This screen, as shown in Figure A.9, is where you can set up data sources and transaction data sources. The settings are straightforward with drop-down lists to help you. For now, let's leave this alone. Click Next.

Figure A.9. JDBC data source configuration.


11.
The next screen enables you to test your database settings. This is shown in Figure A.10. If your database is up and running (PointBase can start it from this user interface), you can test whether the connection is successful. Test your pool if you want to, and then click Next.

Figure A.10. Testing the JDBC connections.


12.
The screen shown in Figure A.11 enables you to choose whether you want to configure JMS components. Select Yes and click on Next.

Figure A.11. JMS options.


13.
Configure a JMS connection factory, as shown in Figure A.12. When you're done, click Next.

Figure A.12. JMS connection factory.


14.
Configure a JMS file store if you want. When you're finished, click Next. This is shown in Figure A.13.

Figure A.13. JMS file store options.


15.
Configure a JMS JDBC store. I am leaving this as optional for you, because you can always do this later through the administration console. This is shown in Figure A.14. After you're done, click Next.

Figure A.14. JMS JDBC store.


16.
Configure a JMS server (shown in Figure A.15). When you've finished, click Next.

Figure A.15. Configure JMS server.


17.
Figure A.16 shows the targeting section. It enables you to choose the servers on which each of the JDBC pools, JMS queues, topics, and so on are deployed. Select Yes and click Next.

Figure A.16. JMS targeting options.


18.
Assign a server to each of the JDBC pools and JMS destinations and click on Next as shown in Figure A.17.

Figure A.17. Services targeting.


19.
The screen shown in Figure A.18 enables you to configure advanced security. You can create groups, users, and roles. Feel free to explore this, but for now it is okay if you skip it and click Next.

Figure A.18. Advanced security options.


20.
On the screen in Figure A.19, you must create a WebLogic administrator. For our sample domain, you can use weblogic/password. For production environments, you would want to use something less intuitive and more secure. After you enter these details, click Next.

Figure A.19. Configure username and password.


21.
The screen shown in Figure A.20 enables you to create shortcuts and deploy WebLogic as a service. For now, leave the defaults as shown in the figure and click Next.

Figure A.20. Windows options.


22.
On the screen in Figure A.21, you define the start scripts and directories. You can leave the defaults for now and click Next.

Figure A.21. Build Start menu entries.


23.
Now you select between development mode and production mode. You can also choose the JDK you want to use. For now, leave the defaults shown in Figure A.22 or change them as you want. Click Next when you're done.

Figure A.22. WebLogic configuration environment.


24.
You're almost done. Figure A.23 shows the last screen. Choose a name for your domain configuration. The default is mydomain. Click Create to create your domain. Click on Done and exit the Configuration Wizard.

Figure A.23. Create a WebLogic configuration.


Installation can be confirmed by finding the new /user_projects/mydomain directory under the BEA installation directory. If you've used WebLogic before, the structure will look familiar. Under the /mydomain directory is the /applications/ directory. Read the readme.txt file created in the applications directory for details on its purpose. If you elected to install the domain into the Windows Start menu from step 22, you can start the new server from that link. Otherwise, you can start it from a command prompt at

C:/bea/user_projects/mydomain/StartWebLogic.cmd

Now that a domain environment has been created, we can use it to host our Web and enterprise applications.

..................Content has been hidden....................

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