|
|
|
| |
Migrating WebLogic Server Applications to Version 6.0
The following sections describe a list of issues you need to consider when migrating your applications from WebLogic Server Version 4.5 or 5.1 to WebLogic Server Version 6.0. For a more detailed procedure, see the Migration Tutorial on BEA dev2dev. Where indicated, additional details are provided in the feature-specific documents:
The following sections discuss migration issues for each of the J2EE services. In conformance with the J2EE specification, WebLogic 6.0 deploys applications as one or more of the following types:
Each of the above application types have their own deployment descriptors and directory format. If you are using legacy applications that were used with WebLogic Server 4.5 or WebLogic Server 5.1, you may need to make changes in order to migrate them successfully to WebLogic Server 6.0. This includes creating XML deployment descriptors and arranging resources according to a prescribed directory format. There is no longer a weblogic.properties file in WebLogic Server 6.0. The configuration of your applications is handled through the WebLogic Server Administration Console and configuration information is stored in an XML file.
The following sections contain information on converting your existing weblogic.properties files to the new XML format and converting your existing applications to the appropriate J2EE application type.
Converting weblogic.properties to .xml files
Earlier releases of WebLogic Server used a weblogic.properties file to configure applications. In WebLogic 6.0, configuration of applications is handled through XML descriptor files and the Administration Console. Converting a weblogic.properties file from an earlier version of WebLogic Server creates a new domain for your applications and adds .xml files that define how your applications are set up. Convert your weblogic.properties file to the appropriate .xml files by following these steps:
Throughout this document, the directory of the new domain you have created is referred to as domainName. The default domain that is provided with the original installation of WebLogic Server 6.0 is called mydomain and is located in the wlserver6.0/config/ directory. It is necessary to set up your new domain before migrating any applications.
The weblogic.properties file is no longer supported. Earlier releases of WebLogic Server used a weblogic.properties file to configure applications. In WebLogic Server 6.1, configuration of applications is handled through XML descriptor files and the Administration Console. If the attribute can be configured in the Administration Console, the table shows the navigation path to the attribute
The table below shows which config.xml attribute handles the function formerly performed by which weblogic.properties property. weblogic.properties Mapping Table
|
"weblogic.properties" file Property |
Configuration Attribute |
Console Navigation |
|---|---|---|
|
weblogic.administrator.email |
config.xml: (Administrator element) |
|
|
weblogic.administrator.location |
config.xml: (Administrator element)999 |
|
|
weblogic.administrator.name |
config.xml: (Administrator element) |
|
|
weblogic.administrator.phone |
config.xml: (Administrator element) |
|
|
weblogic.cluster.defaultLoadAlgorithm |
config.xml: (Cluster element) |
Cluster: General: Default Load Algorithm |
|
weblogic.cluster.multicastAddress |
config.xml: (Cluster element) |
Cluster: General: Multicast Address |
|
weblogic.cluster.multicastTTL |
config.xml: (Cluster element) |
Cluster: Multicast: MulticastTTL |
|
weblogic.cluster.name |
config.xml (Cluster element) |
Cluster:General: Name |
|
weblogic.httpd.authRealmName |
config.xml: (WebAppComponent element) |
|
|
weblogic.httpd.charsets |
config.xml: (WebServer element) |
|
|
weblogic.httpd.clustering.enable |
config.xml: (WebServer element) |
|
|
weblogic.httpd.defaultServerName |
config.xml (WebServer element) |
|
|
weblogic.httpd.defaultWebApp |
config.xml: (WebServer element) |
|
|
weblogic.httpd.enable |
config.xml: (Server element) |
|
|
weblogic.httpd.enableLogFile |
config.xml: (WebServer element) |
|
|
weblogic.httpd.http.keepAliveSecs |
config.xml: (WebServer element) |
|
|
weblogic.httpd.https.keepAliveSecs |
config.xml: (WebServer element) |
|
|
weblogic.httpd.indexDirectories |
config.xml: (WebAppComponent element) |
|
|
weblogic.httpd.keepAlive.enable |
config.xml: (WebServer element) |
|
|
weblogic.httpd.logFileBufferKBytes |
config.xml: (WebServer element) |
|
|
weblogic.httpd.logFileFlushSecs |
config.xml: (WebServer element) |
|
|
weblogic.httpd.logFileFormat |
config.xml: (WebServer element) |
|
|
weblogic.httpd.logFileName |
config.xml: (WebServer element) |
|
|
weblogic.httpd.logRotationPeriodMins |
config.xml: (WebServer element) |
|
|
weblogic.httpd.logRotationPeriodMins |
config.xml: (WebServer element) |
|
|
weblogic.httpd.logRotationType |
config.xml: (WebServer element) |
|
|
weblogic.httpd.maxLogFileSizeKBytes |
config.xml: (WebServer element) |
|
|
weblogic.httpd.mimeType |
web.xml: <mime-mapping> element |
|
|
weblogic.httpd.postTimeoutSecs |
config.xml: (WebServer element) |
|
|
weblogic.httpd.servlet.extensionCaseSensitive |
config.xml: (WebAppComponent element) |
|
|
weblogic.httpd.servlet.reloadCheckSecs |
config.xml: (WebAppComponent element) |
|
|
weblogic.httpd.servlet.SingleThreadedModelPoolSize |
config.xml: (WebAppComponent element) |
|
|
weblogic.httpd.session.cacheEntries |
weblogic.xml: <param-name>/<param-value> element pair |
|
|
weblogic.httpd.session.cookie.comment |
weblogic.xml: <param-name>/<param-value> element pair |
|
|
weblogic.httpd.session.cookie.domain |
weblogic.xml: <param-name>/<param-value> element pair |
|
|
weblogic.httpd.session.cookie.maxAgeSecs |
weblogic.xml: <param-name>/<param-value> element pair |
|
|
weblogic.httpd.session.cookie.name |
weblogic.xml: <param-name>/<param-value> element pair |
|
|
weblogic.httpd.session.cookie.path |
weblogic.xml: <param-name>/<param-value> element pair |
|
|
weblogic.httpd.session.cookies.enable |
weblogic.xml: <param-name>/<param-value> element pair |
|
|
weblogic.httpd.session.debug |
weblogic.xml: |
|
|
weblogic.httpd.session.enable |
weblogic.xml: <param-name>/<param-value> element pair |
|
|
weblogic.httpd.session.invalidationintervalSecs |
weblogic.xml: <param-name>/<param-value> element pair |
|
|
weblogic.httpd.session.jdbc.connTimeoutSecs |
weblogic.xml: <param-name>/<param-value> element pair |
|
|
weblogic.httpd.session.persistentStoreDir |
weblogic.xml: <param-name>/<param-value> element pair |
|
|
weblogic.httpd.session.persistentStorePool |
weblogic.xml: <param-name>/<param-value> element pair |
|
|
weblogic.httpd.session.persistentStoreShared |
weblogic.xml: <param-name>/<param-value> element pair |
|
|
weblogic.httpd.session.persistentStoreType |
weblogic.xml: <param-name>/<param-value> element pair |
|
|
weblogic.httpd.session.sessionIDLength |
weblogic.xml: <param-name>/<param-value> element pair |
|
|
weblogic.httpd.session.swapintervalSecs |
weblogic.xml: <param-name>/<param-value> element pair |
|
|
weblogic.httpd.session.timeoutSecs |
weblogic.xml: |
|
|
weblogic.httpd.session.URLRewriting.enable |
weblogic.xml: <param-name>/<param-value> element pair |
|
|
weblogic.httpd.tunneling.clientPingSecs |
config.xml: (Server element) |
Servers: Tuning: Tunneling Client Ping |
|
weblogic.httpd.tunneling.clientTimeoutSecs |
config.xml: (Server element) |
Servers: Tuning: Tunneling Client Timeout |
|
weblogic.httpd.tunnelingenabled |
config.xml (Server element) |
Servers: Tuning: Enable Tuneling |
|
weblogic.httpd.URLResource |
config.xml: (WebServer element) |
|
|
weblogic.iiop.password |
config.xml: (Server element) |
Servers: servername: Configuration: Protocols: Default IIOPPassword |
|
weblogic.iiop.user |
config.xml: (Server element) |
Servers: servername: Configuration:Protocols: Default IIOPUser |
|
weblogic.jdbc.connectionPool
|
config.xml
|
|
|
weblogic.jdbc.enableLogFile |
config.xml: (Server element) |
|
|
weblogic.jdbc.logFileName |
config.xml: (Server element) |
|
|
weblogic.jms.ConnectionConsumer |
config.xml
|
Services: JMS |
|
weblogic.jms.connectionFactoryArgs.<<factoryName>>
|
config.xml:
|
Services: JMS: Connection Factories |
|
weblogic.jms.connectionFactoryName |
config.xml:
|
Services: JMS: Connection Factories |
|
weblogic.jms.connectionPool |
ConnectionPool (JMSJDBCStore element) |
Services: JMS: JMSJDBCStores |
|
weblogic.jms.queue |
config.xml: StoreEnabled (JMSDestination element) |
Services: JMS:Connection Factories |
|
weblogic.jms.queueSessionPool |
config.xml: ConnectionFactory ListenerClass AcknowledgeMode SessionsMaximum Transacted (JMSSessionPool element) |
Services: JMS: Servers: Session Pools |
|
weblogic.jms.tableNamePrefix |
config.xml: |
|
|
weblogic.jms.topic |
config.xml StoreEnabled (JMSDestination element) |
Services: JMS: Servers: JMSServer-0: Destinations: JMS Queus, JMS Topics |
|
weblogic.jms.topicSessionPool |
config.xml: ConnectionFactory ListenerClass AcknowledgeMode SessionsMaximum Transacted (JMSSessionPool element) |
Services: JMS: Servers: JMSServer-0: JMS Session Pools |
|
weblogic.jndi.transportableObjectFactories |
config.xml: (Server element) |
|
|
weblogic.login.readTimeoutMillisSSL |
config.xml (SSL element) |
|
|
weblogic.security.audit.provider |
config.xml (Security element) |
Security: Audit Provider Class |
|
weblogic.security.certificate.authority |
config.xml (SSL element) |
|
|
weblogic.security.certificate.server |
config.xml: (SSL element) |
|
|
weblogic.security.certificateCacheSize |
config.xml: (SSL element) |
|
|
weblogic.security.clientRootCA |
config.xml: (SSL element) |
|
|
weblogic.security.disableGuest |
config.xml: (Security element) |
Security: Guest Disabled |
|
weblogic.security.enforceClientCert |
config.xml: (SSL element) |
|
|
weblogic.security.key.export.lifespan |
config.xml: (SSL element) |
|
|
weblogic.security.key.server |
config.xml: (SSL element) |
|
|
weblogic.security.ldaprealm.authentication |
config.xml: (LDAPRealm element) |
|
|
weblogic.security.ldaprealm.credential |
config.xml: (LDAPRealm element) |
|
|
weblogic.security.ldaprealm.factory |
config.xml (LDAPRealm element) |
|
|
weblogic.security.ldaprealm.groupDN |
config.xml: (LDAPRealm element) |
|
|
weblogic.security.ldaprealm.groupIsContext |
config.xml: (LDAPRealm element) |
|
|
weblogic.security.ldaprealm.groupNameAttribute |
config.xml: (LDAP Realm element) |
|
|
weblogic.security.ldaprealm.groupUsernameAttribute |
config.xml: (LDAPRealm element) |
|
|
weblogic.security.ldaprealm.principal |
config.xml: (LDAPRealm element) |
|
|
weblogic.security.ldaprealm.ssl |
config.xml: (LDAPRealm element) |
|
|
weblogic.security.ldaprealm.url |
config.xml: (LDAPRealm element) |
|
|
weblogic.security.ldaprealm.userAuthentication |
config.xml: (LDAPRealm element) |
|
|
weblogic.security.ldaprealm.userDN |
config.xml: (LDAPRealm element) |
|
|
weblogic.security.ldaprealm.userNameAttribute |
config.xml: (LDAPRealm element) |
|
|
weblogic.security.ldaprealm.userPasswordAttribute |
config.xml: (LDAPRealm element) |
|
|
weblogic.security.net.connectionFilter |
config.xml: (Security element) |
|
|
weblogic.security.ntrealm.domain |
config.xml: (NTRealm element) |
|
|
weblogic.security.realm.cache.acl.enable |
config.xml: (CachingRealm element) |
|
|
weblogic.security.realm.cache.acl.size |
config.xml: (CachingRealm element) |
|
|
weblogic.security.realm.cache.acl.ttl.negative |
config.xml: (CachingRealm element) |
|
|
weblogic.security.realm.cache.acl.ttl.positive |
config.xml: (CachingRealm element) |
|
|
weblogic.security.realm.cache.auth.enable |
config.xml: (CachingRealm element) |
|
|
weblogic.security.realm.cache.auth.size |
config.xml: (CachingRealm element) |
|
|
weblogic.security.realm.cache.auth.ttl.negative |
config.xml: (CachingRealm element) |
|
|
weblogic.security.realm.cache.auth.ttl.positive |
config.xml: (CachingRealm element) |
|
|
weblogic.security.realm.cache.caseSensitive |
config.xml: |
|
|
weblogic.security.realm.cache.group.enable |
config.xml: (CachingRealm element) |
|
|
weblogic.security.realm.cache.group.size |
config.xml: (CachingRealm element) |
|
|
weblogic.security.realm.cache.group.ttl.negative |
config.xml: (CachingRealm element) |
|
|
weblogic.security.realm.cache.group.ttl.positive |
config.xml: (CachingRealm element) |
|
|
weblogic.security.realm.cache.perm.enable |
config.xml: (CachingRealm element) |
|
|
weblogic.security.realm.cache.perm.size |
config.xml: (CachingRealm element) |
|
|
weblogic.security.realm.cache.perm.ttl.negative |
config.xml: (CachingRealm element) |
|
|
weblogic.security.realm.cache.perm.ttl.positive |
config.xml: (CachingRealm element) |
|
|
weblogic.security.realm.cache.user.enable |
config.xml: (CachingRealm element) |
|
|
weblogic.security.realm.cache.user.size |
config.xml: (CachingRealm element) |
|
|
weblogic.security.realm.cache.user.ttl.negative |
config.xml: (CachingRealm element) |
|
|
weblogic.security.realm.cache.user.ttl.positive |
config.xml: (CachingRealm element) |
|
|
weblogic.security.realm.certAuthenticator |
config.xml: (SSL element) |
|
|
weblogic.security.SSL.ciphersuite |
config.xml (SSL element) |
|
|
weblogic.security.ssl.enable |
config.xml: (SSL element) |
|
|
weblogic.security.SSL.hostnameVerifier |
config.xml (SSL element) |
|
|
weblogic.security.SSLHandler.enable |
config.xml: (SSL element) |
|
|
weblogic.security.unixrealm.authProgram |
config.xml: (UnixRealm element) |
|
|
weblogic.system.AdministrationPort |
config.xml (Server element) |
|
|
weblogic.system.AdministrationPort |
config.xml: (Server element) |
|
|
weblogic.system.bindAddr |
config.xml: (Server element) |
|
|
weblogic.system.defaultProtocol |
config.xml: (Server element) |
|
|
weblogic.system.defaultSecureProtocol |
config.xml: (Server element) |
|
|
weblogic.system.enableConsole |
config.xml: (Kernel element) |
|
|
weblogic.system.enableIIOP |
config.xml: (Server element) |
|
|
weblogic.system.enableReverseDNSLookups |
config.xml: (Server element) |
|
|
weblogic.system.enableSetGID |
config.xml: (UnixMachine element) |
|
|
weblogic.system.enableSetUID |
config.xml: (UnixMachine element) |
|
|
weblogic.system.enableTGIOP |
config.xml (Server element) |
|
|
weblogic.system.helpPageURL |
config.xml (Server element) |
|
|
weblogic.system.home |
config.xml: (Server element) |
|
|
weblogic.system.ListenPort |
config.xml (Server element) |
|
|
weblogic.system.logFile |
config.xml: (Log element) |
|
|
weblogic.system.MagicThreadBackToSocket |
config.xml: (ServerDebug element) |
|
|
weblogic.system.MagicThreadDumpFile |
config.xml: (ServerDebug element) |
|
|
weblogic.system.MagicThreadDumpHost |
config.xml: (ServerDebug element) |
|
|
weblogic.system.magicThreadDumps |
config.xml: (ServerDebug element) |
|
|
weblogic.system.maxLogFileSize |
config.xml: (Log element) |
|
|
weblogic.system.nativeIO.enable |
config.xml: (Server element) |
|
|
weblogic.system.nonPrivGroup |
config.xml (UnixMachine element) |
|
|
weblogic.system.nonPrivUser |
config.xml (UnixMachine element) |
|
|
weblogic.system.percentSocketReaders |
config.xml: (Kernel element) |
|
|
weblogic.system.readTimeoutMillis |
config.xml (Server element) |
|
|
weblogic.system.readTimeoutMillis |
config.xml: (Server element) |
|
|
weblogic.system.SSL.useJava |
config.xml: (SSL element) |
|
|
weblogic.system.SSLListenPort |
config.xml: (SSL element) |
|
|
weblogic.system.startupFailureIsFatal |
config.xml (StartupClass element) |
|
|
weblogic.system.user |
config.xml: (Security element) |
Security: Users |
|
weblogic.system.weight |
config.xml (Server element) |
Server: servername: Cluster: Cluster Weight |
|
weblogic.workspace.showUserKeysOnly |
config.xml: (Server element) |
|
|
weblogic.zac.enable |
config.xml: (Server element) |
|
|
weblogic.zac.publishRootProp |
config.xml: (Server element) |
A domain is an interrelated collection of WebLogic Server resources and configuration files that occupy a single specific namespace. Only one domain can be active at a time. For more information on domains, see Domains, the Administration Server and Managed Servers. To use your new domain you must start your server with the correct domain and copy the WebLogic Server Administration Console into the appropriate location. The WebLogic Server Administration Console is a sophisticated Web Application and an essential tool in managing your server.
Restarting the Server
In order to use your new domain you must restart the server, specifying before startup your new domain name. To do so, startup scripts have been provided. These scripts, which are generated when a weblogic.property file is converted, are named startdomainName.cmd (for Windows users) and startdomainName.sh (for UNIX users) and exist under the wlserver6.0/config/domainName directory. These scripts will start the server in the new domain.
These startup scripts make it easier to start instances of WebLogic Server. You may need to modify them to fit your environment and applications. See Starting and Stopping the WebLogic Server for more information on scripts and starting servers. More information is also available in the Administrator's Guide, under Migrating from Earlier Versions of WebLogic Server.
Copying the Administration Console to Your New Domain
Before restarting your server, it is also necessary to copy the Adminstration Console Web Application into the newly created domain. The Administration Console is a Web Application with its own .war file and can be treated as any other Web Application.
To copy it into your new domain, follow these steps:
At the top middle of the main console window as well as the top of the left hand pane, you should see your new domain displayed as the active domain. Now you can begin to migrate your applications.
Applications on a J2EE-compliant server such as WebLogic Server 6.0 are created and deployed as one of the following four types: Web Applications, Enterprise JavaBeans, Enterprise Archives, and Client Applications. To migrate your existing components to WebLogic Server 6.0, create the appropriate J2EE deployment units. Web Applications are usually a collection of servlets, JSPs, and HTML files. Enterprise JavaBeans are server-side Java components written according to the EJB specification. Enterprise Archives may contain a combination of EJB components and Web Application components. Client Applications are Java classes that connect to WebLogic Server using Remote Method Invocation (RMI). Each of the aforementioned J2EE deployment units are discussed in greater detail within the following sections.
A Web Application is created by correctly packaging into a single unit the servlets, JSPs and HTML pages that make up an application.
In order to deploy an application as a Web Application it is necessary to create certain .xml files that contain configuration information on that application. If you have converted your properties file, these .xml files (web.xml and weblogic.xml) have been created for you and placed inside a wlserver6.0/config/domainName/applications/DefaultWebApp_myserver/WEB-INF directory. The process of converting your weblogic.properties file also creates the config.xml file located in wlserver6.0/config/domainName/. This file contains configuration information specific to your server.
In order to migrate applications into a Web Application deployed on WebLogic Server 6.0, the files of your application must be placed within a directory structure that follows a specific pattern. For development, these files can be left in an exploded directory format. However, for production situations, it is highly recommended that you bundle your applications into the appropriate .war file as a singular Web Application. For more information on Web Applications see Understanding WebLogic Server Applications and Deploying and Configuring Web Applications.
Directory Structure
Web Applications are organized within a specified directory structure so that they can be archived and deployed on WebLogic Server. All servlets, classes, static files, and other resources belonging to a Web Application are organized under a directory hierarchy. The root of this hierarchy defines the document root of your Web Application. All files under this root directory can be served to the client, except for files under the special directories WEB-INF and META-INF located in the root directory. The root directory should be named with the name of your Web Application and placed inside the wlserver6.0/config/domainName/applications directory.
The following diagram illustrates the directory structure of any Web Application.
WebApplicationRoot/(Publically available files such as
| .jsp, .html, .jpg, .gif)
|
+WEB-INF/-+
|
+ classes/(directory containing
| Java classes including
| servlets used by the
| Web Application)
|
+ lib/(directory containing
| jar files used by the
| Web Application)
|
+ web.xml
|
+ weblogic.xml
If you have already converted your properties file, the appropriate web.xml and weblogic.xml files have already been created for you under the directory wlserver6.0/config/domainName/applications/DefaultWebApp_myserver/WEB-INF. Follow the above directory structure and place the .xml files in the wlserver6.0/config/domainName/applications/webAppName/WEB-INF directory that you create. All applications must be placed inside a wlserver6.0/config/domainName/applications directory in order to be deployed. For more information see Developing WebLogic Server Applications.
XML Deployment Descriptors
The Web Application Deployment Descriptor (web.xml) is a standard J2EE descriptor used to register your servlets, define servlet initialization parameters, register JSP tag libraries, define security constraints, and other Web Application parameters. For detailed instructions on creating the deployment descriptor, see Writing the Web Application Deployment Descriptor.
There is also a WebLogic-specific Deployment Descriptor (weblogic.xml). In this file you define JSP properties, JNDI mappings, security role mappings, and HTTP session parameters. The WebLogic-specific deployment descriptor also defines how named resources in the web.xml file are mapped to resources residing elsewhere in WebLogic Server. For detailed instructions on creating the WebLogic-specific deployment descriptor, see Writing the WebLogic-specific Deployment Descriptor. This file may not be required if you have no need for any of the above mentioned properties, mappings, or parameters.
If you have converted your weblogic.properties file, a web.xml and weblogic.xml file have already been created for you. Use the web.xml and weblogic.xml files, in conjunction with the console, to configure your applications. The .xml files can be viewed through any text editor. To edit them, simply make your changes and save the file as web.xml or weblogic.xml with the appropriate path as specified by the prescribed directory structure. See Configuring your Web Applications for more information. If you do not want to deploy your applications together as a single Web Application, you need to split up the .xml files that have been created for you, creating the appropriate .xml files specific to each Web Application.
WAR Files
A .war file is a Web Application archive. If you have correctly followed the prescribed directory structure of a Web Application and created the appropriate web.xml and weblogic.xml files, it is strongly recommended that in production environments your applications are bundled together in a Web Application deployed as a .war file. Once you have done so, it is important to remove the previously existing directory structure so that WebLogic Server only has one instance of each application.
Use the following command line from the root directory containing your Web Application to create a .war file, replacing `webAppName' with the specific name you have chosen for your Web Application:
jar cvf webAppName.war *
You now have created a .war file that contains all the files and configuration information for your Web Application.
Deploying Web Applications
To deploy your bundled Web Applications properly, place the appropriate .war file in the c:/wlserver6.0/config/domainName/applications directory. You can also install the application through the Administration Console. To do so, go to the console home and choose Install Applications under the Getting Started menu. Select the correct .war file and it will be installed automatically. Note that it is necessary to have your applications reside in a c:/wlserver6.0/config/domainName/applications directory in order for them to work.
Web Applications should be deployed automatically after they have been installed. Check to see that they are deployed under the Deployments node in the left hand pane of the Administration Console.
You can configure certain deployment attributes for your Web Application using the Administration Console. Select the Web Applications node under the Deployments heading. Select your Web Application. Click on the appropriate tab to configure. For more information on setting attributes in the console, see the Web Application section of the Console Help.
JavaServer Pages (JSP) and Servlets
This section contains information specific to JSPs and servlets that may be pertinent to your applications.