![]() |
![]() |
|
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.
Example Steps to Migrate a Simple Servlet
The following procedure migrates the simple Hello World Servlet that was provided with WebLogic 5.1 Server to WebLogic Server 6.0.
<!DOCTYPE web-app (View Source for full doctype...)>
- <web-app>
- <servlet>
<servlet-name>HelloWorldServlet</servlet-name>
<servlet-class>examples.servlets.HelloWorldServlet</servlet-class>
</servlet>
- <servlet-mapping>
<servlet-name>HelloWorldServlet</servlet-name>
<url-pattern>/hello/*</url-pattern>
</servlet-mapping>
</web-app>
For more information on web.xml files, see Writing the Web Application Deployment Descriptor. A weblogic.xml file is not necessary with such a simple, stand-alone servlet as HelloWorld.
For more information on weblogic.xml files, see Writing the WebLogic-Specific Deployment Descriptor. If you registered the HelloWorldServlet in Weblogic 5.1 and have converted your weblogic.properties file into .xml, simply move the web.xml file from wlserver6.0/config/domainName/applications/DefaultWebApp_myserver/WEB-INF to C:/hello/WEB-INF/. If you did not convert your weblogic.properties file, or did not register the HelloWorldServlet in your earlier version of WebLogic, create a web.xml file like the above example and place it inside the C:/hello/WEB-INF/ directory.
C:\hello\WEB-INF\classes>javac -d . HelloWorldServlet.java
This should compile the file and create the correct package structure.
jar cvf hello.war *
This command will create a hello.war file and place it inside the C:/hello directory.
Enterprise JavaBeans Applications
To migrate a 1.1 EJB from your WebLogic Server 5.1 installation to WebLogic Server 6.0, first open the Administration Console. From the home page click on Install Applications under the Getting Started heading. Locate the .jar file you wish to install by clicking the Browse button. Once you have located it, click Open and then Upload. Your bean should now be automatically deployed.
To check your output, run a setEnv script on a client window and set your development environment (for more information see Establishing a Development Environment). Then compile all the needed client classes. For example, using the Stateless Session Bean sample that was provided with WebLogic Server 5.1, you would use the following command:
javac -d %CLIENTCLASSES% Trader.java TraderHome.java TradeResult.java Client.java
Then reference the EJB interfaces in your client's classpath:
java -classpath %CLIENTCLASSES%;%CLASSPATH% examples.ejb.basic.statelessSession.Client
To run the client, enter this command:
java examples.ejb.basic.statelessSession.Client
In order to convert an EJB 1.1 bean to a EJB 2.0 bean, WebLogic provides a DDConverter. It is recommended that you develop EJB 2.0 beans in conjunction with WebLogic server 6.0. However, for 1.1 beans already used in production, it is not necessary to convert them to 2.0 beans. EJB 1.1 beans are deployable with WebLogic Server 6.0. If you do wish to convert 1.1 beans to 2.0 beans, see the DDConverter documentation for more information.
The basic steps required to convert a simple CMP 1.1 bean to a 2.0 bean are as follows:
The following list includes further information that may be pertinent to users migrating their Enterprise JavaBeans to use WebLogic Server 6.0.
For more information on Enterprise JavaBeans, see Enterprise JavaBeans Components and Programming WebLogic EJB.
An Enterprise Application consists of assembled components, and is a .jar file with an .ear extension. An .ear file contains all of the .jar and .war component archive files for an application and an XML descriptor that describes the bundled components. The META-INF/application.xml deployment descriptor contains an entry for each Web and EJB module, and additional entries to describe security roles and application resources such as databases.
EnterpriseApplicationStagingDirectory/
|
+ .jar files
|
+ .war files
|
+META-INF/-+
|
+ application.xml
When you have assembled all of the Web Archive and EJB Archives for your application and placed them under your staging directory, you can bundle them together in an Enterprise Archive (.ear) file so that you can deploy all of the dependent components together. Copy the .war and EJB .jar files into the staging directory and then create a META-INF/application.xml deployment descriptor for the application. Follow the directory structure depicted above. The application.xml file contains a descriptor for each component in the application, using a DTD supplied by Sun Microsystems. For more information on the application.xml file, see Client Application Deployment Descriptor Elements. Note that if you are using JSPs and want them to compile at run time you must have the home and remote interfaces of the bean included in the classes directory of your .war file.
Create the Enterprise Archive by executing a jar command like the following in the staging directory:
jar cvf myApp.ear *
The .ear file can be installed through the console by clicking on the Install Applications link under the Getting Started heading in the home page of the console. The .ear file needs to be in the c:/wlserver6.0/config/domainName/applications directory. For more information on Enterprise Applications, see Staging Enterprise Applications.
WebLogic Server also supports J2EE client applications, packaged in a jar file with a standard XML deployment descriptor. Client applications (meaning: when the client is not a Web browser) are Java classes that connect to WebLogic Server using Remote Method Invocation (RMI). A Java client can access Enterprise JavaBeans, JDBC connections, JMS messaging, and other services using RMI. Client applications range from simple command line utilities that use standard I/O to highly interactive GUI applications built using the Java Swing/AWT classes.
To execute a WebLogic Server Java client, the client computer needs the weblogic_sp.jar file, the weblogic.jar file, the remote interfaces for any RMI classes and Enterprise Beans that are on WebLogic Server, as well as the client application classes. To simplify maintenance and deployment, it is a good idea to package a client-side application in a jar file that can be added to the client's classpath along with the weblogic.jar and weblogic_sp.jar files. The weblogic.ClientDeployer command line utility is executed on the client computer to run a client application packaged to this specification. For more information about J2EE client applications, see Staging and Deploying Client Applications.
In the original domain provided with WebLogic Server 6.0, as well as in any domains that have been created using the weblogic.properties file converter, there is a wlserver6.0/config/domainName/applications/DefaultWebApp_myserver directory that has been created. This directory can be used to contain files made available by your web server. HTML and JSP files may be placed here and be made available, separate from any applications you install. If necessary, you can create subdirectories within the DefaultWebApp_myserver directory to handle relative links, such as image files.
Applications and Managed Servers
By default, applications are deployed on the administration server's config.xml block and JVM. However, in most cases, this is not good practice. The administration server should just be used for administrative purposes. Users should define new managed servers and associate the applications with those servers. This is done via the Administration Console. For more information, see Configuring WebLogic Servers and Clusters and Domains, the Administration Server, and Managed Servers.
What follows is a list of different components that can be used by applications. Deprecated features, upgrades, and the important changes that have been made in WebLogic Server 6.0 are noted.
The following changes in JTA have taken place:
For specific details on migrating JMS, see Migrating WebLogic JMS Applications in Programming WebLogic JMS.
WebLogic Server 6.0 supports the JavaSoft JMS specification version 1.0.2. In order to use your existing JMS applications, perform the following steps:
In WebLogic Server 5.1, the WebLogic JMS data for JMS messages and durable subscribers was kept in five database tables that were accessible via JDBC. In WebLogic Server 6.0, JMS queues are defined during configuration, and no longer saved within database tables. Message data and durable subscriptions are stored either in two JDBC tables or via a directory within the file system. The current JDBC database store content format is not compatible with the format in WebLogic Server 6.0 Beta.
For more information on migrating your WebLogic JMS applications, see Migrating WebLogic JMS Applications in Programming WebLogic JMS. Note that WebLogic Events are being deprecated and being replaced by JMS messages with NO_ACKNOWLEDGE or MULTICAST_NO_ACKNOWLEDGE delivery modes. Each of these delivery modes is described in Programming WebLogic JMS.
Java Database Connectivity (JDBC)
The following changes have been made in JDBC:
The following tips are for users migrating to WebLogic 6.0 who used RMI in their previous version of WebLogic Server:
Several internationalization and localization changes have been made in this version:
For details on internationalization in this version, see BEA WebLogic Server Internationalization Guide.
Existing WebLogic Server customers may have private keys that are unprotected in Definite Encoding Rules (DER) format. For those private keys to work with this version of WebLogic Server, you need to convert the private keys to a PKCS#5/PKCS#8 Privacy Enhanced Mail (PEM) format. Use the protectkey conversion tool to convert your private keys. The protectkey tool takes a private key in DER format and a password and converts them to a PKCS#5/PKCS#8 PEM format. For more information about the protectkey tool, see Managing Security in the Administration Guide.
It is highly recommended that users read our documentation on Programming WebLogic Security for the most detailed information on using security with WebLogic Server 6.0. WebLogic users migrating from earlier releases should read the following list of tips and issues:
To run a WAP application on WebLogic Server 6.0, you must now specify the MIME types associated with WAP in the web.xml file of the web application. In WebLogic Server 5.1, the default mime-type can be set using weblogic.httpd.defaultMimeType in weblogic.properties where its default value is "text/plain". WebLogic Server 6.0, WebLogic Server 6.1, and WebLogic Server 7.0 do not have a default mime-type. You must explicitly specify mime-type for each extension in the web.xml file. For information on required MIME types see Using Wireless Application Protocol (WAP) with WebLogic Server. For information on creating and editing a web.xml file, see Writing Web Application Deployment Descriptors.
An example configuration of the mime-types in the web.xml file:
<mime-type>image/tiff</extension>
<mime-type>image/tiff</extension>
The following tips are for users migrating to WebLogic 6.0 who used Web Services in their previous version of WebLogic:
JSP Parameters (keepgenerated, verbose, packagePrefix, pageCheckSeconds, encoding)
HTTP sessionParameters (CookieDomain, CookieComment, CookieMaxAgeSecs, CookieName, CookiePath, CookiesEnabled, InvalidationIntervalSecs, PersistentStoreDir, PersistentStorePool, PersistentStoreType, SwapIntervalSecs, IDLength, CacheSize, TimeoutSecs, JDBConnectionTimeoutSecs, URLRewritingEnabled)
The XML parser has been updated and is now based on the Apache Xerces parser. The parser implements version 2 of the SAX and DOM interfaces. Users who made use of older parsers that were shipped in the weblogicaux.jar (such as Sun's Project X parser) may receive deprecation messages.
The following APIs and features are deprecated in anticipation of future removal from the product:
WebLogic Events are deprecated and should be replaced by JMS messages with NO_ACKNOWLEDGE or MULTICAST_NO_ACKNOWLEDGE delivery modes. See Programming WebLogic JMS for more information.
The Delegating security realm is no longer supported in WebLogic Server 6.0. If you are using the Delegating security realm, you will have to use another type of security realm to store Users, Groups, and ACLs. For details, see "http://download.oracle.com/docs/cd/E13222_01/wls/docs60/adminguide/cnfgsec.html".
The following APIs and features have been removed:
Use the new Administration Console.
This feature relied on the Microsoft JVM (Jview) which is no longer supported.
|
Copyright © 2000 BEA Systems, Inc. All rights reserved.
|