![]() | |
Sun Java System Application Server 7 2004Q2 Update 1 Standard and Enterprise Edition Troubleshooting Guide |
Appendix B
Frequently Asked Questions (FAQs)These frequently-asked-questions (FAQs) in this appendix are sorted into the following sections:
Installation and AccessThis section addresses the following questions:
How to tell which version of the application server is running?
Execute the following command:
asadmin version
How to determine the build date and version?
To get the application server version, you use this command:
asadmin version
To get the build date, use this variation:
asadmin version --verbose
The build date appears in parentheses, like this:
... (build A021926-226218)
The field before the hyphen contains the date, and the field after the hyphen contains the time. The following examples show ho to extract the date and time from those fields.
To extract the date from “A021926”:
Here, the build date is 08/15/2002.
To extract the time from “226218”
So the build time in this example is 11:51:07.
Where else is version information available?
In the Administration interface, click the server instance name in the left panel and select the General tab. The Install Version information appears in the right panel.
At the command line, use the asadmin version command:
version [--user admin_user] [--password admin_password] [--host localhost] [--port 4848] [--local=false] [--verbose=false]
You can also check the /var/sadm/install/productregistry XML file for the Application Server.
How do I access the sample applications?
You can tour the features of the Sun Java System Application Server by running the sample applications. Access the start page here:
install_dir/samples/index.html
LicensingThis section addresses the following questions:
How do I renew an expired evaluation license?
Update the license using the asadmin install-license command.
Instructions are contained in the Licensing appendix of the Sun Java System Application Server Installation Guide
Can I upgrade from an evaluation license to a full Sun Java System Application Server 7 license?
Maybe. Follow these steps:
- Go to the Application Server’s home directory.
- Go to the /bin dir.
- Run the asadmin command.
This starts a new session with the prompt asadmin>
- Enter the command display-licence.
The licence details are displayed.
- Check whether you have unlimited licence. If you don’t, you cannot upgrade.
- Enter the install-licence command.
You will be prompted for your key.
- Copy and paste the key from the following location:
http://edist.central/
In a media package, how do I get the license key?
The software license key, also known as the activation code, is on the welcome card in the media package.
How can I get an evaluation license for Enterprise Edition?
there isn’t one
Platform SupportMost questions about supported platforms for Sun Java System Application Server 7 can be found in the Platform Summary documents for the various releases here:
This section addresses the following questions:
What’s the difference between Standard Edition and Enterprise Edition?
The Enterprise Edition (EE) provides the High Availability features like load balancing (LB) and Session Persistence (SP), in addition to all SE functionality. Please check the release notes of the EE version for specific details of LB and SP.
What Sun ONE Message Queue versions are supported?
Which versions of Sun ONE Message Queue are supported with which versions of Sun Java System Application Server?
What J2SE versions are supported?
What database drivers are supported?
The Application Server 7 product is designed to support connectivity to any database management system with a corresponding JDBC driver. Refer to the Sun Java System Application Server Platform Summary for a list of the components that Sun has tested and found to be acceptable for constructing J2EE-compatible database configurations.
Additional driver have been tested to meet the JDBC requirements of the J2EE 1.3 platform with the following JDBC Driver Certification Program:
These drivers can be used for JDBC connectivity with the Application Server. Although Sun offers no product support for these drivers, we will support the use of these drivers with the Application Server.
Is JADO supported for Sun Java System Application Server 7?
Answer: Java Data Objects (JADO) is used under the covers for the container-managed persistence (CMP) engine. JDO is not exposed/supported.
Does Sun Java System Application Server 7 have a JCA connector to talk to SAP R3?
Our ISV partners for JCA connectors are Insevo, Attachmate, iWay, and Seagull. They have ported to Sun Java System Application Server 7.
Are custom authorization providers supported?
As a J2EE 1.3 product, Sun Java System Application Server 7 does not support custom authorization providers. Custom authorization plug-in support is defined by JSR-115 (JACC) which was only introduced in J2EE 1.4. This will be supported in a future release.
How is load balancing supported?
The web connector on a web server that fronts the Application Server cannot do load balancing at all. However, a load distribution capability is enabled. The connector can interrogate the URI in the request and determine which of several Sun Java System Application Server instances is to service the request. The mapping of the URI to an application server instance is a fixed 1:1 relationship. That is, requests sent to http://www.abc.com./xyz/... will always be distributed to the single Sun Java System Application Server instance that services the xyx URI.
You can have authentic load balancing by using a third-party product to front the web server or the actual application server instances themselves. If HttpSession is used in the application, you will want to turn on sticky load balancing based upon embedded tags or cookies. Before a session is established, the third-party load balancer could use techniques like round robin and weighted round robin load balancing to direct traffic to any of the Sun Java System Application Server instances. Thereafter, with sticky enabled, the load balancer will stick all subsequent processing to the application server instance that created the original session.
Functional SupportHow do you run a CMP application with a different database?
Assume you already have a CMP ear file using dbschema in oracle. In order to run the same cmp application file with Sybase, MS SQL, or other databases, perform the following operations:
This procedure saves time by creating the dbschema for the new database.
Can remote EJB clients use something other than RMI over IIOP, or is that the only support protocol?
According to the J2EE spec, RMI/IIOP is the proposed way of remotely interacting directly with an enterprise bean inside an EJB container. However, you can wrap that bean as a web service and access it using SOAP/HTTP (SOAP over HTTP). You can also use a MOM approach using JMS destinations (queues and topics) as another way of interacting with the functionality of the bean.
Is sticky load balancing supported?
It is supported for SE, but no failovers occur.
Yes for EE. Sun Java System Application Server 7, Enterprise Edition load balancer uses a sticky round robin algorithm to load balance incoming HTTP and HTTPS requests. The load balancer plug-in uses the following methods to determine session stickiness:
Are multiple JVMs for hosting components supported?
With both PE and SE, you can create multiple application server instances for a given product installation. By default, the first server instance will be named server1. You can then use the Administration interface to create a second instance called, for example, server2. Once started, both server1 and server2 will have their own separate JVMs. However, a given instance (such as server1) has one and only one JVM. Instances do not share JVMs.
General AdministrationThis section addresses the following questions:
How do I logout from the Admin Console?
There is no explicit logout button in the Admin Console. To logout , close the browser you are using to access the console. Also, close other instances of the same browser that may be running on your machine. For example, if you are using Netscape 4.79 to login and access the Admin Console, you need to close all instances of Netscape 4.79 running on your machine. That action will log you out of the admin GUI.
How do I give limited admin privileges to a user?
Use the following procedure to give admin privileges to another user for a particular instance of the server.
- Stop the appserver instance (server1)
- Make sure that the imq broker instance is also stopped (ps -ef | grep imq).
- Change Owner recursively for all the directories and subdirectories including server1 under /domains/domain1 (so that the new user is now the owner of those directories), using a command like this: chown -R s1as server1
- Change the Group recursively for all the directories and subdirectories including server1 under /domains/domain1 (so that the group is now changed to the group under which the new user is a member of), using a command like this: chgrp -R appserver server1
- Go to /domains/domain1/server1/config
- In the init.conf file, change the user name from root to the new user.
- Make sure that these changes are reflected, using asadmin reconfig
- Repeat steps 4 and 5 for the iMQ instance also. This instance is found under /var/imq/instances. The user and group name should now be changed for all the directories and sub-directories including domain1_server1.
- Start the appserver instance (server1) by logging in as the new user.
- Deploy an application into this server instance.
The owner of this application is now the user.
High-AvailabilityThis section addresses the following questions:
Where are the load balancer files?
The load balancer configuration files, sun-loadbalancer_1_0.dtd and loadbalancer.xml, should be in the following locations:
How do I enable the health checker?
To enable the health checker for the load balancer, edit the following properties int the loadbalancer.xml file:
Server Configuration and ControlThis section addresses the following questions:
Is instance restart the same as stop/start?
No. There is a significant difference between issuing the restart command, and issuing consecutive commands to stop and then start an instance.
The restart can be used to restart an instance on the same JVM with the same security environment. So restarting an instance will not change JVM configuration parameters (like Debug=on/off) or security parameters (like security-enabled ). To make such changes effective, you must stop the instance and then start it again.
The restart command is convenient, in that it allows an admin to restart a server without re-typing security passwords. So it is useful for changing the instance configuration. It also lets a server instance be started by a manager who knows the security passwords, while allowing it to be restarted by an admin.
How to supply password for automated startup or unattended restart?
By default, the Application Server prompts the administrator for the SSL key database password before starting up. To allow unattended restart, create a filed called password.conf in the instance/config directory, andinsert the following information:
internal:<adminPassword>
Unattended restart is then enabled, and the instance/bin/startserv script can then be used to to start the server.
Note
Make sure that your system is adequately protected so that this file and the key databases are not compromised.
How do you specify an XA DataSource in a jdbc-connection-pool?
To use an XA DataSource, set res-type="javax.sql.XADataSource". For example:
<jdbc-connection-pool name="myPool"
... res-type="javax.sql.XADataSource">If this attribute is not set, the pool will default to non-xa if the class also implements DataSource. Otherwise, an exception is thrown.
How do you setup a hosts virtual server?
The Application Server has two types of virtual servers: hosts and ip virtual server. To setup a hosts virtual server, use one of the following procedures:
- Use the Admin Console:
- Launch a browser window from the machine you want to add the hosts virtual server on.
- Use that browser to access the Admin Console.
- Select server1 -> HTTP Server -> Virtual Servers.
- Click New and set the following values:
- Id: vs1
- Hosts: abc.com
- HTTP listeners: Select the default listener (http-listener-1) or specify a new listener
Note:
A remote browser can’t be used to set up "abc.com" unless it is lauched from the remote machine -- because the admin console can only add a hosts virtual server into its own /etc/hosts environment.- On aUnix platform:
- On a Windows platform:
How do you disable batch insert and update?
The cmp solution uses batched inserts and updates to optimize performance. This is a standard JDBC feature. However, there might be some database drivers that do not implement or fully support this feature correctly.
To disable batched inserts and updates, please define following in the java-config section of the server.xml file:
<jvm-options>
-Dcom.sun.jdo.spi.persistence.support.sqlstore.USE_BATCH=false
</jvm-options>How do you add a new user and password?
Use the admin console to add a new user and password to the key file for asecurity application. Access the admin console at http://localhost:<admin_port>, andperform the following operations:
- Expand the server instance (for example, server1).
- Expand Security.
- Expand Realms.
- Open File.
- Click Manage Users.
- Click New and enter the required information (User ID, Password, Retype Password, Group List).
- Click OK.
- Click the server instance again.
- Apply changes and restart the instance.
- Go to the ~/config/keyfile and verify that the entry was added.
How do you set the JVM heap size?
Use the jvm-options element in thejava-config section of the server.xml file as follows:
<jvm-options> -Xms104857600 -Xmx454857600 </jvm-options>
For a list of options, see java -help and java -X.
How do you start a single application server instance rather than all the instances in a domain?
To start individual instances in the default domain (domain1), use the asadmin start-instance command as follows:
start-instance server3
To start all instances in the default domain (domain 1), use the asadmin start-appserver command.
What is the ‘Apply Changes Required’ message about?
What is happening when I receive the Apply Changes Required message in the Administration interface? I made my changes and pressed the Save button. Why do I have to also Apply Changes?
When you make your changes to a configuration setting for an instance and click Save, the update is written to a temporary file called server.xml.changes in a backup subdirectory under the /config directory. The actual server.xml file, stored in the main /config directory, represents the current configuration of the server. This file has yet to be updated. When you "Apply Changes" as prompted, the contents of the server.xml.changes file are applied to the server.xml file in the main /config directory. When the update is successful, the server.xml.changes file is deleted from the /config/backup directory.
This is a good feature because it allows you to make a number of configuration changes without needing to apply them to the running server one at a time. It is essentially a batch update feature.
Why are multiple IIOP listeners useful and how many listeners are allowed?
When configuring the ORB in the Admin Console, you can have multiple IIOP Listeners. The intention is to support an administrator's desire to have an application server instance support one port for “plain” IIOP and another port for IIOP/SSL. The Administration interface lets you configure as many IIOP Listeners as you want, but only two can be enabled (Listener Enabled toggled on) at the same time. If you try to have more than two enabled at once, the Administration interface displays an error.
Does an application server instance have to be running in order to deploy to it?
No, the instance need not be running, but the Admin Server that controls the instance needs to be up and running. If the Admin Server is running, you can either use its Deploy feature in the Administration interface or the asadmin deploy command to deploy a module or an application to an instance regardless of whether or not the instance is up and running.
Does the Admin Server need to be running to run my application?
No. You can exercise an application server instance without the Admin Server process running. However, to utilize the SNMP capabilities for monitoring the HTTP server, you need to have the Sun Java System Application Server administration process up and running due to its role in interacting with the SNMP master agent.
Can I configure the application server to run as non-root?
Instructions for setting up administration for a non-root user are contained in the Sun Java System Application Server Installation Guide.
Where is the secondary storage area for stateful session beans?
In an Entity bean the passivation process has to be considered as a simple notification that the instance is going to be dissociated from the object. Saving the bean state (synchronizing it with the database), on an entity bean, is something that is done through ejbStore().
For stateful session beans, the passivation process of a bean saves the state of the bean in a secondary storage. The database is considered to be the primary storage area. The stateful container’s own storage area (memory, a cache, or the disk) is the secondary storage area.
To find the secondary storage area on the Application Server from the Admin Console:
- Click the instance server on the left frame, for example the default instance, server1.
- From right frame, click Advanced.
- An element called Session Store Location contains the file system location of the secondary storage area for stateful session bean. (You can also change the directory here, but after doing so, you need to apply changes and restart the instance server.)
When you deploy a J2EE application on the instance server, a directory with the application name is created under "Session Store Location"/ejb/j2ee-apps. Under this application name directory, a sub directory with full qualified bean class name is created. If you deploy an ejb module, the same directory structure is created under "Session Store Location"/ejb/j2ee-modules.
Refer to the Application Server developer guide to find out how a stateful session bean is eligible for passivation, and refer to sun-ejb-jar_2_0-0.dtd to find out how to customize bean-cache properties.
When the stateful bean is passivated, stateful container will write out the serialized state of the bean into a file under secondary storage area. This file will be kept on disk until the next call comes in with same session id. The file will be removed if user calls ejb.remove() on this bean, or it will be removed by the stateful container when <removal-timeout-in-seconds> is reached. If you restart the instance server, all objects in the secondary storage will be cleaned up.
Application ProgrammingThis section addresses the following questions:
How does an application implement transaction timeouts?
In the current release there is no way to set a transaction time out for container managed transactions. The default is no time out. To time out transactions, use bean managed transactions. Modify server.xml to change the default transaction time out value for all beans:
transaction-service timeout-in-seconds="0"
How do I use Xerces versions of JAXP in my application?
Version 7 of the application server relies on the Crimson version of the XML parser (JAXP 1.1) that is built into the JVM. The Xerces versions are included in the installation at <install_dir>/lib/endorsed, but they can’t be used as an endorsed standard.
Typically, a JAXPapplication sets the endorsed.dirs system property to override the libraries found on the boot class path. But that technique does not work for a Version 7 server application, because doing so would break the container.
Tthe Xerces versions of the JAXP libraries are included in the server’s classpath, however. To access them, the application must configure the JAXP factory using the following property names and associated values:
property: “javax.xml.parsers.DocumentBuilderFactory”, value: "org.apache.xerces.jaxp.JAXPDocumentBuilderFactoryImpl"
property: “javax.xml.parsers.SAXParserFactory”,
value: "org.apache.xerces.jaxp.SAXParserFactoryImpl"How do I get an instanceTransactionManager?
The TransactionManager is a privileged interface. Applications should only use UserTransaction, and not TransactionManager.
Application DebuggingThis section addresses the following questions:
Can I modify roles in the web or EJB deployment descriptors without restarting the application server?
Changes to application deployment descriptors require a redeploy (not necessarily a restart, if you are using dynamic redeployment).
However, changing application roles dynamically is not really the best approach. The application roles in J2EE are intended as design-time groupings. Instead, look into dynamically changing the mapping of particular users to these roles. You can do this by mapping the J2EE application role to a group (or groups) and altering the membership of these groups as needed.
Upgrade/MigrationThis section addresses the following questions:
Can I upgrade from other versions of Sun Java System Application Server 7 to Enterprise Edition?
Yes. You can use the automatic upgrade tool to do so.
Note:
Only one version of Sun Java System Application Server can be on a single machine, so if you have an existing version 7 installation, you must first uninstall your existing version using the uninstallation program, then install Enterprise Edition.Can I migrate from other application servers?
Yes. You can use the automatic migration tool to do so.