Download user guide, user manual, owner manual and instructions guide
5 600 brands
1 870 000 user's guides
Search a brand
Advanced Search



Our partners wish to propose you the following products


Visit APPLE official site

User manual APPLE JAVA APPLICATION SERVER GUIDE VERSION 10.3

Diplodocs help download the user guide APPLE JAVA APPLICATION SERVER GUIDE VERSION 10.3.



Download the user manual APPLE JAVA APPLICATION SERVER GUIDE VERSION 10.3  
Download the complete
user guide (1925 Ko)
Need help, support, reviews, tips or troubleshooting for your APPLE JAVA APPLICATION SERVER GUIDE VERSION 10.3 products ?

This product, although classified under the brand APPLE, may have been manufactured by EMAGIC after mergers, acquisitions, or a change in name.

Preview of the first 3 pages of manual

You either have JavaScript turned off or an old version of Adobe Flash Player
Get the latest Flash Player.
User guide APPLE JAVA APPLICATION SERVER GUIDE VERSION 10.3

Detailed instructions for use are in the User's Guide.

Java Application Server Guide For Version 10.3 or Later 2005-08-11 Apple Inc. © 2003, 2005 Apple Computer, Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, mechanical, electronic, photocopying, recording, or otherwise, without prior written permission of Apple Inc., with the following exceptions: Any person is hereby authorized to store documentation on a single computer for personal use only and to print copies of documentation for personal use provided that the documentation contains Apple's copyright notice. The Apple logo is a trademark of Apple Inc. Use of the "keyboard" Apple logo (Option-Shift-K) for commercial purposes without the prior written consent of Apple may constitute trademark infringement and unfair competition in violation of federal and state laws. No licenses, express or implied, are granted with respect to any of the technology described in this document. Apple retains all intellectual property rights associated with the technology described in this document. This document is intended to assist application developers to develop applications only for Apple-labeled or Apple-licensed computers. Every effort has been made to ensure that the information in this document is accurate. Apple is not responsible for typographical errors. Apple Inc. 1 Infinite Loop Cupertino, CA 95014 408-996-1010 .Mac is a service mark of Apple Computer, Inc. Apple, the Apple logo, Logic, Mac, and Mac OS are trademarks of Apple Computer, Inc., registered in the United States and other countries. Finder is a trademark of Apple Computer, Inc. Java and all Java-based trademarks are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. Simultaneously published in the United States and Canada. Even though Apple has reviewed this document, APPLE MAKES NO WARRANTY OR REPRESENTATION, EITHER EXPRESS OR IMPLIED, WITH RESPECT TO THIS DOCUMENT, ITS QUALITY, ACCURACY, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. AS A RESULT, THIS DOCUMENT IS PROVIDED "AS IS," AND YOU, THE READER, ARE ASSUMING THE ENTIRE RISK AS TO ITS QUALITY AND ACCURACY. IN NO EVENT WILL APPLE BE LIABLE FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES RESULTING FROM ANY DEFECT OR INACCURACY IN THIS DOCUMENT, even if advised of the possibility of such damages. THE WARRANTY AND REMEDIES SET FORTH ABOVE ARE EXCLUSIVE AND IN LIEU OF ALL OTHERS, ORAL OR WRITTEN, EXPRESS OR IMPLIED. No Apple dealer, agent, or employee is authorized to make any modification, extension, or addition to this warranty. Some states do not allow the exclusion or limitation of implied warranties or liability for incidental or consequential damages, so the above limitation or exclusion may not apply to you. This warranty gives you specific legal rights, and you may also have other rights which vary from state to state. Contents Introduction Introduction to Java Application Server Guide 7 Organization of This Document 7 See Also 8 Chapter 1 Application Server Overview 9 JBoss in Mac OS X Server 9 Three Deployment Configurations 10 Chapter 2 Configuring Applications 11 Starting the Application Server 11 Configuring Your Application 13 Starting the JBoss Deployment Tool 14 Loading Your Application 14 Configuring Your Application's Components 17 Saving a Configured Application 18 Deploying Your Application 19 Chapter 3 Configuring and Deploying Sun's Pet Store 21 Set Up the Environment 21 Configure the Pet Store Enterprise Application 22 Open the petstore.ear File in the Deployment Tool 22 Configure Application-Wide Settings 23 Configure the AsyncSender Enterprise Bean 24 Configure the Catalog Enterprise Bean 24 Configure the Customer Module 25 Configure the PetStore Web Application 29 Configure the SignOn Module 30 Configure the User Enterprise Bean 30 Configure the Counter Enterprise Bean 30 Save the Application 31 Configure the Supplier Enterprise Application 31 Open the supplier.ear file in the Deployment Tool 31 Configure Application-Wide Settings 31 Configure the Supplier Module 32 3 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. CONTENTS Configure the SupplierPurchaseOrder Module 33 Configure the Supplier Web Application Module 34 Save the Application 35 Deploy and Test the Application 35 Chapter 4 Administering Application Servers 37 Logging In to the Management Tool 37 Choosing a Task 39 Managing Application Servers 40 Configuring Application Servers 43 Monitoring Application Servers 43 Starting and Stopping Services 44 Creating a Data Source 45 Creating a Topic or a Queue 45 Deploying Applications 46 Chapter 5 Balancing User Load and Replicating Sessions 47 Distributable Applications 47 Load Balancing and Clustering 48 Enable Load Balancing in the Web Server 48 Enable Load Balancing in the Application Servers 51 Test the Configuration 52 Document Revision History 53 Glossary 55 4 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. Figures and Tables Chapter 2 Configuring Applications 11 Figure 2-1 Figure 2-2 Figure 2-3 Figure 2-4 Figure 2-5 Figure 2-6 The Load Application window of the deployment tool 14 The Loaded Application window 15 The deployment-tool main window 16 The Quick Config pane of a component's configuration window 17 A module-settings window 18 The Save Application window of the deployment tool 18 Chapter 3 Configuring and Deploying Sun's Pet Store 21 Table 3-1 Relationship information for the Customer module 27 Chapter 4 Administering Application Servers 37 Figure 4-1 Figure 4-2 Figure 4-3 Figure 4-4 Figure 4-5 Figure 4-6 Figure 4-7 The Configuration window of the management tool 40 The JBoss Management Console window 40 The JBoss Management Console window showing the Security Configuration pane of the log-in configuration service 41 The JBoss Management Console window showing the Statistics pane of the Pet Store ShoppingCart enterprise bean 42 The JBoss Management Console window showing one of the configuration panes for the JMS Directory Service 43 The JBoss Management Console window showing the statistics of the Deploy Service 44 The JBoss Management Console window showing the Start or Stop Services pane 45 Chapter 5 Balancing User Load and Replicating Sessions 47 Figure 5-1 Figure 5-2 The WebApp window of the petstore.ear archive 48 The workers.properties file in /etc/httpd 50 5 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. FIGURES AND TABLES 6 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. INTRODUCTION Introduction to Java Application Server Guide Note: This document was previously titled Mac OS X Server Java Application Server Administration. JBoss is a powerful Java-based open-source application server that is very popular among Java 2, Enterprise Edition (J2EE) application developers. This document describes how to configure and use the JBoss application server in Mac OS X Server, which lets you deploy J2EE applications easily and reliably. This document is intended for system administrators, J2EE application assemblers, and developers. It assumes you have a solid background in system administration and J2EE technology. You must be familiar with Mac OS X Server, especially how to use Terminal to issue shell commands. Knowledge of database engines, such as MySQL, is helpful but not required. Organization of This Document This document has the following chapters: "Application Server Overview" (page 9) provides an overview of JBoss for Mac OS X Server. "Configuring Applications" (page 11) explains how to perform certain tasks with the deployment tool, such as opening, configuring, and saving application archives. "Configuring and Deploying Sun's Pet Store" (page 21) walks you through configuring and deploying Sun's Pet Store application in Mac OS X Server. "Administering Application Servers" (page 37) teaches you how to manage application servers, which are JBoss instances running on one or more computers. "Balancing User Load and Replicating Sessions" (page 47) explains how to enable an application to be distributable among cluster nodes and walks you through configuring HTTP load balancing for Pet Store using three computers. This document also contains a revision history, a glossary, and an index. Organization of This Document 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. 7 INTRODUCTION Introduction to Java Application Server Guide See Also To use this document to its fullest, you should download its companion files, which are packaged in Application_Server_companion.zip, located in the same webpage from which you obtained this document. For an introduction to J2EE, visit http://java.sun.com/j2ee. You can get detailed information on JBoss at http://jboss.org. 8 See Also 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. CHAPTER 1 Application Server Overview JBoss is an open-source highly popular Java-based application server. Based on the Java 2, Enterprise Edition (J2EE) platform, JBoss provides an affordable delivery system for enterprise applications. Applications that follow the J2EE standard can be deployed on other application servers, such as WebLogic, WebSphere, and JRun, with little or no modification. JBoss provides many useful features in addition those defined in the J2EE standard, including support for clustering, session replication, mail, and security. Mac OS X Server includes two easy-to-use, HTML-based tools that facilitate the configuration of J2EE applications for deployment: The deployment tool and the management tool. The deployment tool allows you to open application or component archives (EAR files, WAR files, JAR files, SAR files, and so on) without having to manually decompress the archives. The application lets you view or change the values of settings specified in the META-INF and WEB-INF directories of the archives. See "Configuring Applications" (page 11) for more information. The management tool allows you to manage application servers (JBoss instances) running on one or more computers. This application lets you start and stop services provided by individual application servers, configure services, and create data sources, queues, and topics. See "Administering Application Servers" (page 37) for details. This chapter provides an overview of JBoss for Mac OS X Server. JBoss in Mac OS X Server Mac OS X Server version 10.3 includes JBoss version 3.2.2RC2. To provide a high level of availability, Mac OS X Server includes a "watchdog" process that ensures that the application server is always running (if you turn on the application server in Server Admin). If the application server freezes or crashes, the daemon restarts it automatically. In addition, Mac OS X Server offers load balancing and session failover through Apache and JBoss: Apache, coupled with the mod_jk plug-in, provides HTTP load balancing with session affinity (sticky sessions) and connects to JBoss instances through AJP connectors. JBoss offers session failover through HTTP session state replication in the cluster configuration. JBoss also provides load balancing for enterprise beans, including failover for stateful session beans, and support for session affinity. JBoss in Mac OS X Server 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. 9 CHAPTER 1 Application Server Overview In Mac OS X Server, JBoss is configured to use Tomcat (using the AJP connector) as its web server and servlet container. In addition, HTTP and HTTPS (through port 8443) are enabled by default. You can manage the application server from the Server Admin application. This provides you with a simple way to start, stop, and monitor the application server. You can use the command line, if you prefer. Mac OS X Server includes two applications that allow you to deploy applications on JBoss and monitor their performance. They are the JBoss deployment tool and the JBoss management tool. The deployment tool allows you to configure an application or an application component so that, for example, it accesses the appropriate data sources and database tables when it's run. This is how application developers decouple business logic from the database engine that is used to persist data. That way, you can use the database engine that meets your needs and not the one the developer used while developing the application. For details on the deployment tool, see "Configuring Applications" (page 11). The management tool lets you administer the local (running on the computer you are logged in to) application server, and monitor local and remote (running on a computer in the local network) application servers. As part of administering an application server, you may start and stop services, configure services, deploy applications, and add data sources, queues, and topics. When monitoring an application server, the management tool lets you access the statistics provided by the resources and services running on it. For example, a service may indicate its name, its purpose, and when it was started. For more information on the management tool, see "Administering Application Servers" (page 37). Three Deployment Configurations In Mac OS X Server, all the JBoss configurable settings are set up for maximum J2EE compliance. There are three standard deployment configurations in JBoss for Mac OS X Server: The development configuration offers increased logging and also consults schema documents. As a result, an application is not deployed when the configuration files do not adhere to their respective schemas. The standalone configuration is set up for high performance on a single server. The cluster configuration is optimized for high performance on a cluster of servers. This includes load balancing as well as session replication among stateful session beans and HTTP sessions. 10 Three Deployment Configurations 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. CHAPTER 2 Configuring Applications Before you can deploy an application on an application server, you have to start the application server and then configure or assemble the application. This is the process through which you specify data sources, database mappings, JNDI resources, and so on. You configure J2EE applications by modifying XML files in META-INF and WEB-INF directories in application archives. Performing this task manually is tedious and error prone. The JBoss deployment tool allows you to configure applications without having to unarchive EAR files, WAR files, or JAR files, as the tool lets you configure these files directly. This chapter explains how to start the application server and configure and deploy your application. Starting the Application Server To configure an application using the deployment tool, you must connect to a running application server. Follow these steps to start the application server on a computer. 1. Launch Server Admin, located in /Applications/Server. Starting the Application Server 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. 11 CHAPTER 2 Configuring Applications 2. In the Computers & Services list, select Application Server. 12 Starting the Application Server 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. CHAPTER 2 Configuring Applications 3. In the configuration pane, click Settings. From Configuration Name pop-up menu, choose the appropriate configuration. 4. Click the Start Service toolbar button. After a few seconds the application server should be running. You can confirm that JBoss is running by accessing http://localhost:8080 in your web browser. You should see a webpage titled Welcome to JBoss/Tomcat. You can also start JBoss in Terminal with the following command: $ /Library/JBoss/3.2/bin/run.sh -c deploy-standalone To get detailed information on JBoss activities, use the develop configuration. This is useful when you need to make sure JBoss notices when you deploy or undeploy a module, or when you need to determine whether exceptions are thrown as JBoss starts a deployed application. The develop configuration produces a detailed log of JBoss activities. It is more useful when you launch the application server from the command line because you see the results of actions immediately in the Terminal window from which you launch the application server. Configuring Your Application The following sections teach you how to start the deployment tool and configure your application. Configuring Your Application 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. 13 CHAPTER 2 Configuring Applications Starting the JBoss Deployment Tool To start the deployment tool, double-click DeploymentTool.woa in /Library/JBoss/Applications or enter the following command in Terminal: $ /Library/JBoss/Applications/DeploymentTool.woa/DeploymentTool After a moment, the Load Application window appears. Note: Running the JBoss Deployment Tool requires a web browser that supports Frames and Javascript. Some web browsers may need to have pop-up blocking disabled. Loading Your Application The Load Application window is where you specify the location of the application or component you want to configure. Although the window is titled Load Application, you can also use the deployment tool to configure EAR files, WAR files, and JAR files. "Figure 3-1" shows the Load Application window. Figure 2-1 The Load Application window of the deployment tool 1. Enter the full path to the file in the text field in the Load Application window, and click Load Application. Note: The file path you enter in the text field is from the perspective of the server the deployment tool runs on. That is, if you access the deployment tool from a web browser that runs on a different computer, the archive you configure must reside on the server, not the computer the web browser runs on. Normally, you cannot save an application with invalid XML files. That is, you have to configure all the elements that show up in red in the main window. You can override this by deselecting Validate XML Files in the Load Application window. However, you may not be able to reload an application that has been saved in this state. 14 Configuring Your Application 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. CHAPTER 2 Configuring Applications After the deployment tool loads the application, it displays the Loaded Application window, shown in "Figure 3-2". Figure 2-2 The Loaded Application window 2. Click "Click here to continue" to move on. The deployment tool displays the main window (also known as the navigation window). The main window presents a hierarchy of components generated from the XML files present in the META-INF and WEB-INF directories of the components contained in the archive you opened. For example, "Figure 3-3" shows the components present in the petstore.ear file of Sun Microsystem's Pet Store application. You must configure the items in red to save the application. "Configuring Your Application's Components" (page 17) shows you how to do this. Configuring Your Application 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. 15 CHAPTER 2 Configuring Applications Figure 2-3 The deployment-tool main window "Figure 3-3" shows the components of the petstore.ear archive. The following list describes some of the items in the main window: PetStoreEAR (Application) Represents the Pet Store enterprise-application archive. Application Settings Clicking this link allows you to configure settings that affect all the modules in the archive when the application is deployed. AsyncSenderEJB (EJB) Represents the archive (JAR file) that contains the files that define the AsyncSender enterprise bean (the asyncsender-ejb.jar file). Clicking the Module Settings link lets you configure module-wide settings and set default values for some settings for all the enterprise beans defined in the module. See "Configure the Customer Module" (page 25) for an example. PetStoreWAR (WebApp) Represents the archive (WAR file) that contains the files that define the web module of the Pet Store enterprise application. 16 Configuring Your Application 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. CHAPTER 2 Configuring Applications Configuring Your Application's Components To configure a component, you choose it from the main window by clicking the appropriate link. This causes the deployment tool to display the configuration window for the component. As you can see in "Figure 3-4", this is a tabbed window that contains one or more panes, which you use to configure specific aspects of the component. The configuration window also contains a Quick Config pane, which contains elements of the component that you must configure for the application to be deployable. "Figure 3-4" shows the Quick Config pane of the CatalogEJB module. It indicates that the JBoss resource references must be configured. The JBoss resource references also appear in the JNDI Resource Refs pane. However, you need to configure them in only one of the two panes. Figure 2-4 The Quick Config pane of a component's configuration window Note: For applications with many components, you may want to configure the Quick Config pages of the invalid components and save the application. Then you can configure each component further in a piecemeal fashion. Some settings apply to an entire module, for example, security roles. In addition, some module settings serve as defaults for settings of individual components in the module. "Figure 3-5" shows some of the module settings of the CustomerJAR module of the petstore.ear application. Configuring modules settings can help to speed up the configuration of a module. See "Configure Module-Wide Settings" (page 25) for an example. Configuring Your Application 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. 17 CHAPTER 2 Configuring Applications Figure 2-5 A module-settings window After configuring the elements in a pane, you click Update to confirm the changes. Keep in mind that the changes are not saved until you save the application. Saving a Configured Application To save a configured application, that is, when no components are shown in red in the main window, click Save in the top of the main window. The Save Application window ("Figure 3-6") appears. Figure 2-6 The Save Application window of the deployment tool 18 Configuring Your Application 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. CHAPTER 2 Configuring Applications Enter the destination of the configured application in the text field of the Save Application window, and click Save Application. Deploying Your Application To deploy a configured application from the deployment tool, simply save the application to /Library/JBoss/3.2/deploy in a single-server deployment or /Library/JBoss/3.2/farm in a cluster deployment. Deploying Your Application 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. 19 CHAPTER 2 Configuring Applications 20 Deploying Your Application 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. CHAPTER 3 Configuring and Deploying Sun's Pet Store Pet Store is a sample J2EE application from Sun Microsystems. Pet Store showcases the power and flexibility of the J2EE platform. This chapter provides a tutorial on the configuration of Sun's Pet Store for deployment in Mac OS X Server. Sun's Pet Store is comprised of several applications. This tutorial uses the Pet Store enterprise application and the Supplier enterprise application. In this tutorial you obtain the Pet Store files from Sun, prepare your Mac OS X Server system for a Pet Store deployment, and configure the Pet Store and Supplier applications for deployment on JBoss. Note: The companion files of this document include configured Pet Store archives that are ready for deployment using MySQL as the database engine. They're at Application_Server_companion/Configured_Pet_Store_archives. You need to perform only the steps listed in "Set Up the Environment" (page 21) and "Deploy and Test the Application" (page 35). See http://developer.java.sun.com/developer/releases/petstore for more information on Sun's Pet Store application. Set Up the Environment Before you can configure an enterprise application for deployment in Mac OS X Server, make sure that you have all the files you need. Then create any necessary tables in your database, and ensure that the appropriate processes are running: 1. Get Pet Store from Sun. Download the Pet Store enterprise application from http://developer.java.sun.com/developer/releases/petstore, and place the petstore1.3.2 directory in your home directory. (Pet Store 1.3.2 is also included as part of this document's companion files.) 2. Configure MySQL: a. Launch MySQL Manager, located in /Applications/Server. b. Click the lock button, and authenticate as the system administrator. Set Up the Environment 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. 21 CHAPTER 3 Configuring and Deploying Sun's Pet Store c. Click Install and then click Start. d. Quit MySQL Manager. 3. Create the Pet Store Tables: a. In Terminal, run the mysql command-line tool. b. Enter use test and press Return. c. Copy the text in Application_Server_companion/Pet_Store_resources/create_tables_sql.txt (in this document's companion files) to the Clipboard, and paste its contents into the mysql command-line tool. d. Enter quit and press Return. 4. Deploy the petstore-destinations-service.xml file. To prepare JBoss for running Pet Store, copy the Application_Server_companion/Pet_Store_resources/petstore-destinations-service.xml file included in this document's companion files to /Library/JBoss/3.2/deploy. 5. Start the application server. You must be running the application server to configure Pet Store. Make sure the application server is running on your computer. See "Starting the Application Server" (page 11) for details. Configure the Pet Store Enterprise Application This section guides you through the steps required to configure the petstore.ear file so that it can be deployed in Mac OS X Server. This process involves specifying the data source that enterprise beans use to obtain a connection to the database, mapping the enterprise beans' CMP fields to table columns, defining relationships among enterprise beans, and so on. Open the petstore.ear File in the Deployment Tool 1. 2. 3. 4. Launch the JBoss deployment tool. (See "Starting the JBoss Deployment Tool" (page 14) for details.) In the Load Application window, enter the full path to the petstore.ear file in the text field, and click Load Application. Click "Click here to continue." In the PetStoreEAR (Application) window (also known as the main window or the navigation window), click Connect. 22 Configure the Pet Store Enterprise Application 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. CHAPTER 3 Configuring and Deploying Sun's Pet Store 5. In the Connect to Server window, enter the host name and the port of the application server. (By default the host is localhost and the port is 1099.) 6. 7. Click Connect to Server. Close the Connect to Server window. Configure Application-Wide Settings In this section you configure the settings that affect all the modules in the petstore.ear archive. 1. 2. 3. Under PetStoreEAR (Application), click Application Settings. In the PetStoreEAR window, click the JBoss tab. Set J2EE Compliant Class Loading to no, and click Update. Configure the Pet Store Enterprise Application 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. 23 CHAPTER 3 Configuring and Deploying Sun's Pet Store 4. Close the window. Configure the AsyncSender Enterprise Bean 1. 2. 3. Under AsyncSenderEJB (EJB), click Enterprise Beans. Then click AsyncSenderEJB. In the AsyncSenderEJB window, select jms/QueueConnectionFactory in the JBoss Resource Refs list, and click Edit. From the Jndi Name pop-up menu, choose java:/ConnectionFactory , and click Update. 4. 5. 6. In the JBoss Resource Env Refs list, select jms/AsyncSenderQueue , and click Edit. From the Jndi Name pop-up menu, choose /queue/supplier/PurchaseOrderQueue, and click Update. Click Update to finish configuring the AsyncSender enterprise bean, and close the window. Configure the Catalog Enterprise Bean 1. 2. 3. 4. 5. Under CatalogJAR (EJB), click Enterprise Beans. Then click CatalogEJB. In the JBoss Resource Refs list in the CatalogEJB window , select jdbc/CatalogDB, and click Edit. From the Jndi Name pop-up menu, choose java:MySqlDS , and click Update. In the JBoss Resources Refs list in the CatalogEJB window, select url/CatalogDAOSQLURL , and click Edit. In the Resource URL text field, enter http://localhost:8080/petstore/CatalogDAOSQL.xml, and click Update. 24 Configure the Pet Store Enterprise Application 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. CHAPTER 3 Configuring and Deploying Sun's Pet Store 6. Click Update to finish configuring the Catalog enterprise bean, and close the window. Configure the Customer Module The following sections guide you through the configuration of the Customer module. Configure Module-Wide Settings This section walks you through setting the data source and data-source mapping for the enterprise beans in the Customer module. It also details how to configure the relationships between some of the enterprise beans. 1. 2. 3. 4. Under CustomerJAR (EJB), click Module Settings. In the CustomerJAR window, click the CMP - Default Settings tab. From the Datasource pop-up menu, choose MySQL 4.0.14 (java:/MySqlDS). From the Datasource Mapping pop-up menu, choose mySQL, and click Update. Configure the Pet Store Enterprise Application 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. 25 CHAPTER 3 Configuring and Deploying Sun's Pet Store 5. From the Entity Command Name pop-up menu, choose no-select-before-insert. The advantage of configuring the database and the data-source mapping at the module level is that the settings apply to all the enterprise beans in the module. Therefore, you don't have to configure those settings for each enterprise bean in the module, unless they differ from the ones set for the module. 6. 7. 8. 9. Click the CMP - PK Generation tab. In the Unknown Pk Class text field, enter java.lang.Long. In the Field Name text field, enter pk. In the Column Name text field, enter pk. 26 Configure the Pet Store Enterprise Application 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. CHAPTER 3 Configuring and Deploying Sun's Pet Store 10. Set Auto Increment to yes. 11. Click the CMP - Relationships tab. 12. Configure the relationships. "Table 4-1" lists the relationship information for the customer module. Table 3-1 Relationship information for the Customer module Role name Column name account_fk address_fk profile_fk Relationship name CustomerEJB-AccountEJB Relationship AccountEJB ContactInfoEJB-AddressEJB Relationship AddressEJB CustomerEJB-ProfileEJB Relationship ProfileEJB AccountEJB-ContactInfoEJB Relationship ContactInfoEJB contactInfo_fk AccountEJB-CreditCardEJB Relationship CreditCardEJB creditCard_fk Perform the following steps to configure each relationship listed in "Table 4-1". a. In the Ejb Relations list, select the relationship to configure, and click Edit. b. In the Relationship Roles list, click the corresponding relationship role. c. Click New next to the Key Fields list. d. In the Field Name text field, enter pk. e. From the Column Name pop-up menu, choose the name of the appropriate column, and click Update. Configure the Pet Store Enterprise Application 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. 27 CHAPTER 3 Configuring and Deploying Sun's Pet Store f. Click Update to finish configuring the relationship role. g. Click Update to finish configuring the relationship. 13. Click Update to finish configuring the Customer module settings, and close the window. Configure the Account Enterprise Bean 1. 2. 3. Under CustomerJAR (EJB), click Enterprise Beans. Then click AccountEJB. From the Table Name pop-up menu in the AccountEJB window, choose PS_Account. Map the CMP fields to the appropriate column names by selecting the field in the Cmp Fields list, clicking Edit, choosing the corresponding column name from the Column Name list, and clicking Update. Click the CMP - Mapping tab. From the Entity Command Name pop-up menu, choose mysql-get-generated-keys. 4. 5. Click Update to finish configuring the Account enterprise bean, and close the window. Configure the Address Enterprise Bean 1. 2. 3. Under Enterprise Beans under CustomerJAR (EJB), click AddressEJB. From the Table Name pop-up menu in the AddressEJB window, choose PS_Address. Map the CMP fields to the appropriate column names by selecting the field in the Cmp Fields list, clicking Edit, choosing the corresponding column name from the Column Name list, and clicking Update. Click the CMP - Mapping tab. From the Entity Command Name pop-up menu, choose mysql-get-generated-keys. 4. 5. Click Update to finish configuring the Address enterprise bean, and close the window. Configure the ContactInfo Enterprise Bean 1. 2. 3. Under Enterprise Beans under CustomerJAR (EJB), click ContactInfoEJB. From the Table Name pop-up menu in the ContactInfoEJB window, choose PS_ContactInfo. Map the CMP fields to the appropriate column names by selecting the field in the Cmp Fields list, clicking Edit, choosing the corresponding column name from the Column Name list, and clicking Update. Click the CMP - Mapping tab. From the Entity Command Name pop-up menu, choose mysql-get-generated-keys. 4. 5. Click Update to finish configuring the ContactInfo enterprise bean, and close the window. 28 Configure the Pet Store Enterprise Application 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. CHAPTER 3 Configuring and Deploying Sun's Pet Store Configure the CreditCard Enterprise Bean 1. 2. 3. Under Enterprise Beans under CustomerJAR (EJB), click CreditCardEJB. From the Table Name pop-up menu in the CreditCardEJB window, choose PS_CreditCard. Map the CMP fields to the appropriate column names by selecting the field in the Cmp Fields list, clicking Edit, choosing the corresponding column name from the Column Name list, and clicking Update. Click the CMP - Mapping tab. From the Entity Command Name pop-up menu, choose mysql-get-generated-keys. 4. 5. Click Update to finish configuring the CreditCard enterprise bean, and close the window. Configure the Customer Enterprise Bean 1. 2. 3. Under Enterprise Beans under CustomerJAR (EJB), click CustomerEJB. From the Table Name pop-up menu in the CustomerEJB window, choose PS_Customer. Map the CMP fields to the appropriate column names by selecting the field in the Cmp Fields list, clicking Edit, choosing the corresponding column name from the Column Name list, and clicking Update. Click Update to finish configuring the Customer enterprise bean, and close the window. 4. Configure the Profile Enterprise Bean 1. 2. 3. Under Enterprise Beans under CustomerJAR (EJB), click ProfileEJB. From the Table Name pop-up menu in the ProfileEJB window, choose PS_Profile. Map the CMP fields to the appropriate column names by selecting the field in the Cmp Fields list, clicking Edit, choosing the corresponding column name from the Column Name list, and clicking Update. Click the CMP - Mapping tab. From the Entity Command Name pop-up menu, choose mysql-get-generated-keys. 4. 5. Click Update to finish configuring the Profile enterprise bean, and close the window. Configure the PetStore Web Application 1. 2. 3. Under PetStoreWAR (WebApp), click Module Settings. In the JBoss Resource Refs list in the PetStoreWAR window, select jdbc/CatalogDB, and click Edit. From the Jndi Name pop-up menu, choose java:/MySqlDS, and click Update. Configure the Pet Store Enterprise Application 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. 29 CHAPTER 3 Configuring and Deploying Sun's Pet Store 4. 5. 6. In the JBoss Resource Refs list, select url/CatalogDAOSQLURL, and click Edit. In the Resource URL text field, enter http://localhost:8080/petstore/CatalogDAOSQL.xml, and click Update. Click Update to finish configuring the PetStore web application, and close the window. Configure the SignOn Module 1. 2. 3. 4. Under SignOnJAR (EJB), click Module Settings. In the SignOnJAR window, click the CMP - Default Settings tab. From the Entity Command Name pop-up menu, choose no-select-before-insert, and click Update. Close the window. Configure the User Enterprise Bean 1. 2. 3. 4. 5. Under Enterprise Beans under SignOnJAR (EJB), click UserEJB. From the Datasource pop-up menu in the UserEJB window, choose MySQL 4.0.14 (java:/MySqlDS). From the Datasource Mapping pop-up menu, choose mySql. From the Table Name pop-up menu, choose PS_User. Map the CMP fields to the appropriate column names by selecting the field in the Cmp Fields list, clicking Edit, choosing the corresponding column name from the Column Name list, and clicking Update. Click Update to finish configuring the User enterprise bean, and close the window. 6. Configure the Counter Enterprise Bean 1. 2. 3. 4. 5. Under UniqueIdGeneratorJAR (EJB), click Enterprise Beans. Then click CounterEJB. From the Datasource pop-up menu in the CounterEJB window, choose MySQL 4.0.14 (java:/MySqlDS). From the Datasource Mapping pop-up menu, choose mySql. From the Table Name pop-up menu, choose PS_Counter. Map the CMP fields to the appropriate column names by selecting the field in the Cmp Fields list, clicking Edit, choosing the corresponding column name from the Column Name list, and clicking Update. 30 Configure the Pet Store Enterprise Application 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. CHAPTER 3 Configuring and Deploying Sun's Pet Store 6. Click Update to finish configuring the Counter enterprise bean, and close the window. Save the Application To save the configured PetStore application, click Save in the navigation window and choose a location for it: 1. 2. 3. 4. Using the Finder or Terminal, create a directory under /Library named Configured_Apps. In the main window, click Save. In the text field in the Save Application window, enter /Library/Configured_Apps/petstore.ear, and click Save Application. Close the window. Configure the Supplier Enterprise Application The following sections guide you through configuring the Supplier enterprise application. Open the supplier.ear file in the Deployment Tool 1. 2. 3. 4. 5. In the PetStoreEAR window, click Load. In the text field in the Load Application window, enter the path to the supplier.ear file, and click Load Application or press Return. In the navigation window, click Connect. If the Connect to Server window indicates that you're not connected to the application server, click Connect to Server. Close the Connect to Server window. Configure Application-Wide Settings 1. 2. 3. 4. Under SupplierEAR (Application), click Application Settings. In the SupplierEAR window, click the JBoss tab. Set J2EE Compliant Class Loading to no, and click Update. Close the window. Configure the Supplier Enterprise Application 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. 31 CHAPTER 3 Configuring and Deploying Sun's Pet Store Configure the Supplier Module The following sections explain how to configure the SupplierJAR module. Configure the Module Settings 1. 2. 3. 4. 5. Under SupplierJAR (EJB), click Module Settings. In the SupplierJAR window, click the CMP - Default Settings tab. From the Datasource pop-up menu, choose MySQL 4.0.14 (java:/MySqlDS). From the Datasource Mapping pop-up menu, choose mySql, and click Update. Close the window. Configure the Inventory Enterprise Bean 1. 2. 3. Under SupplierJAR (EJB), click Enterprise Beans. Then click InventoryEJB. From the Table Name pop-up menu, choose SUPP_Inventory. Map the CMP fields to the appropriate column names by selecting the field in the Cmp Fields list, clicking Edit, choosing the corresponding column name from the Column Name list, and clicking Update. Click Update to finish configuring the Inventory enterprise bean, and close the window. 4. Configure the OrderFulfillmentFacade Enterprise Bean 1. 2. 3. 4. Under Enterprise Beans under SupplierJAR (EJB), click OrderFulfillmentFacade. In the JBoss Resource Refs list in the OrderFulfillmentFacadeEJB window, select url/EntityCatalogURL, and click Edit. In the Res URL text field, enter http://localhost:8080/opc/EntityCatalog.jsp, and click Update. Click Update to finish configuring the OrderFulfillmentFacade enterprise bean, and close the window. Configure the SupplierOrder Message-Driven Bean 1. 2. 3. Under Enterprise Beans under SupplierJAR (EJB), click SupplierOrderMDB. In the JBoss Resource Refs list, select jms/QueueConnectionFactory, and click Edit. From the Jndi Name pop-up menu, choose /ConnectionFactory, and click Update. 32 Configure the Supplier Enterprise Application 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. CHAPTER 3 Configuring and Deploying Sun's Pet Store 4. 5. 6. 7. 8. In the JBoss Resource Refs list, select jms/TopicConnectionFactory, and click Edit. From the Jndi Name pop-up menu, choose /ConnectionFactory, and click Update. In the JBoss Resource Env Refs list, select jms/opc/InvoiceTopic, and click Edit. From the Jndi Name pop-up menu, choose /topic/opc/InvoiceTopic, and click Update. Click Update to finish configuring the SupplierOrder message-driven bean, and close the window. Configure the SupplierPurchaseOrder Module These sections explain how to configure the SupplierPurchaseOrderJAR module. Configure the Module Settings 1. 2. 3. 4. 5. 6. 7. 8. 9. Under SupplierPurchaseOrderJAR (EJB), click Module Settings. In the SupplierPurchaseOrderJAR window, click the CMP - Default Settings tab. From the Datasource pop-up menu, choose MySQL 4.0.14 (java:/MySqlDS). From the Datasource mapping pop-up menu, choose mySql. From the Entity Command Name pop-up menu, choose no-select-before-insert. Click the CMP - PK Generation tab. In the Unknown Pk Class text field, enter java.lang.Long. In the Field Name text field, Enter pk. In the Column Name text field, enter pk. 10. Set Auto Increment to yes, and click Update. 11. Close the window. Configure the Address Enterprise Bean 1. 2. 3. Under SupplierPurchaseOrderJAR (EJB), click Enterprise Beans. Then click AddressEJB. From the Table Name pop-up menu in the AddressEJB window, choose PS_Address. Map the CMP fields to the appropriate column names by selecting the field in the Cmp Fields list, clicking Edit, choosing the corresponding column name from the Column Name list, and clicking Update. Click the CMP - Mapping tab. From the Entity Command Name pop-up menu, choose mysql-get-generated-keys. 4. 5. Click Update to finish configuring the Address enterprise bean, and close the AddressEJB window. Configure the Supplier Enterprise Application 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. 33 CHAPTER 3 Configuring and Deploying Sun's Pet Store Configure the ContactInfo Enterprise Bean 1. 2. 3. Under Enterprise Beans under SupplierPurchaseOrderJAR (EJB), click ContactInfoEJB. From the Table Name pop-up menu in the ContactInfoEJB window, choose PS_ContactInfo. Map the CMP fields to the appropriate column names by selecting the field in the Cmp Fields list, clicking Edit, choosing the corresponding column name from the Column Name list, and clicking Update. Click the CMP - Mapping tab. From the Entity Command Name pop-up menu, choose mysql-get-generated-keys. 4. 5. Click Update to finish configuring the ContactInfo enterprise bean, and close the window. Configure the LineItem Enterprise Bean 1. 2. 3. Under Enterprise Beans under SupplierPurchaseOrderJAR (EJB), click LineItemEJB. From the Table Name pop-up menu in the LineItemEJB window, choose SUPP_LineItem. Map the CMP fields to the appropriate column names by selecting the field in the Cmp Fields list, clicking Edit, choosing the corresponding column name from the Column Name list, and clicking Update. Click the CMP - Mapping tab. From the Entity Command Name pop-up menu, choose mysql-get-generated-keys. 4. 5. Click Update to finish configuring the LineItem enterprise bean, and close the window. Configure the SupplierOrder Enterprise Bean 1. 2. 3. Under Enterprise Beans under SupplierPurchaseOrderJAR (EJB), click SupplierOrderEJB. From the Table Name pop-up menu in the SupplierOrderEJB window, choose SUPP_SupplierOrder. Map the CMP fields to the appropriate column names by selecting the field in the Cmp Fields list, clicking Edit, choosing the corresponding column name from the Column Name list, and clicking Update. Click the CMP - Mapping tab. From the Entity Command Name pop-up menu, choose mysql-get-generated-keys. 4. 5. Click Update to finish configuring the SupplierOrder enterprise bean, and close the window. Configure the Supplier Web Application Module 1. Under SupplierWAR (WebApp), click Module Settings. 34 Configure the Supplier Enterprise Application 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. CHAPTER 3 Configuring and Deploying Sun's Pet Store 2. 3. 4. 5. 6. In the JBoss Resource Env Refs list, select jms/opc/InvoiceTopic, and click Edit. From the Jndi Name pop-up menu, choose /topic/opc/InvoiceTopic, and click Update. In the JBoss Resource Refs list, select jms/TopicConnectionFactory, and click Edit. From the Jndi Name pop-up menu, choose /ConnectionFactory, and click Update. Click Update to finish configuring the Supplier web-application module, and close the window. Save the Application 1. 2. 3. In the navigation window, click Save. In the text field in the Save Application window, enter /Library/Configured_Apps/supplier.ear, and click Save Application. Close the window. Deploy and Test the Application To deploy Pet Store in Mac OS X Server, copy the configured files to /Library/JBoss/3.2/deploy. (You can also use the management tool to deploy the application. See "Deploying Applications" (page 46) for details.) After about a minute, open http://localhost:8080/petstore in your web browser. You could also have saved the EAR files directly to the JBoss deploy directory. However, it's generally safer to configure application files of undeployed archives. Follow these steps to test Pet Store: 1. 2. 3. 4. 5. 6. 7. 8. Open http://localhost:8080/petstore in a web-browser window. Click the link that takes you to the store. In the Welcome to the BluePrints Petstore webpage, click Birds. In the Items webpage, click Amazon Parrot. In the Product webpage, click Add to Cart. In the Cart webpage, click Check Out. In the Sign On webpage, click Sign In. In the Enter Order Information webpage, click Submit. If you get an error page during the test, make sure JBoss is running and recheck the configuration settings described in "Configure the Pet Store Enterprise Application" (page 22) and "Configure the Supplier Enterprise Application" (page 31). Deploy and Test the Application 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. 35 CHAPTER 3 Configuring and Deploying Sun's Pet Store 36 Deploy and Test the Application 2005-08-11 | © 2003, 2005 Apple Computer, Inc. All Rights Reserved. CHAPTER 4 Administering Application Servers Application-server management involves configuring the services available in an application server, turning services on and off, deploying applications, and monitoring application-server resources. This chapter teaches how to manage application servers, which are JBoss instances running on one or more computers. Logging In to the Management Tool Before you can log in to the management tool, the tool must be running. You can launch the management tool by executing the following command: $ /Library/JBoss/Applications/JBossManagement.woa/JBossManagement You log in to the management tool through your web browser. To connect to the management tool, enter the following URL into the Address text field in your web browser: https://localhost:40000. Alternatively, you can click Manage JBoss in the Settings pane in the Server Admin window. To log in to the management tool you must enter the user name and password of an administrator of your computer or a user who is a member of the appserveradm group or the appserverusr group.

If this document matches the user guide, instructions manual or user manual, feature sets, schematics you are looking for, download it now. Diplodocs provides you a fast and easy access to the user manual APPLE JAVA APPLICATION SERVER GUIDE VERSION 10.3.

APPLE offer a product for which we do not have the user manual? Let us know what you are looking for: site Internet, histoire, actualité, filiales, site Internet, mode d'emploi, driver, avis des utilisateurs, meilleur prix des produits, forum d'assistance aux problèmes, annuaire des marques, annuaire des constructeurs, répertoire des marques, répertoire des constructeurs, site Internet de la marque, site Internet du constructeur

Diplodocs allows you to download user manual APPLE JAVA APPLICATION SERVER GUIDE VERSION 10.3, user guide APPLE JAVA APPLICATION SERVER GUIDE VERSION 10.3, instructions APPLE JAVA APPLICATION SERVER GUIDE VERSION 10.3, owner's manual APPLE JAVA APPLICATION SERVER GUIDE VERSION 10.3, online manual APPLE JAVA APPLICATION SERVER GUIDE VERSION 10.3.


Access web reviews APPLE JAVA APPLICATION SERVER GUIDE VERSION 10.3, APEL, APLE, APPLE COMPUTER, Desktop PC, Mini PC & Mac Desktop Computer.
Include the add-on to download manuals from your site, forum or blog Frequently Asked Questions Contact Diplodocs team Last searches
Last additions
Sitemap
Brands starting with A B C D E F G H I J K L M N O P Q R S T U V W X Y Z #
Copyright © 2005 - 2008 - Diplodocs - All Rights Reserved.
Designated trademarks and brands are the property of their respective owners.