WebSphere Application Server V6 备忘录

1. WebSphere with Optimizeit

 

it is for WebSphere 4.0,  while  its almost same as websphere6

 

Using Optimizeit with WebSphere 4.0 Advanced Edition

This tutorial explains how to integrate Optimizeit with IBM WebSphere 4.0 Advanced Edition. These instructions are for both Windows and Unix machines. Once you have integrated Optimizeit, you can attach to any Optimizeit tool without further integration.

Note: In this document <OptIt_Dir> is the directory where Optimizeit has been installed (for example on Windows, C:/Optimizeit/OptimizeitSuite), and <WebSphere_Dir> is the directory where the WebSphere application server has been installed (for example on Unix, /opt/sfw/websphere).

Note on using JDK 1.3 on Solaris machines with WebSphere 4.0: On Solaris machines, IBM WebSphere 4.0 is packaged with and uses by default JDK 1.3. But JDK 1.3 does not support the profiling interface (JVMPI) and so cannot be used with Optimizeit. In order to use Optimizeit with your WebSphere application server, you need JDK 1.3.1 or above. If you do not have JDK 1.3.1 installed, download the software from the Sun java website.

 

Configuring WebSphere with Optimizeit

The following instructions explain how to configure WebSphere to work with Optimizeit.

  1. On Windows machines only, copy the <OptIt_Dir>/lib/oii.dll file to the <WebSphere_Dir>/bin directory.
  2. On Unix machines only, copy the <OptIt_Dir>/lib/liboii.so and <OptIt_Dir>/lib/libpri.so files to the <WebSphere_Dir>/bin directory.
  3. Start the WebSphere Admin Service and then the WebSphere Administrative Console.
  4. In the Administrative Console, select the node of the Application Server you want to profile with.
  5. Select the server that you want to use (for example, Default Server). You will notice several tabs on the panel to the right.
  6. Select the JVM Settings tab, and add <OptIt_Dir>/lib/optit.jar in the Classpaths field.
  1. Scroll down and click Advanced JVM Settings to open the Advanced JVM Settings dialog box.
  2. In the Command Line Arguments field, type -Xrunoii:filter=<OptIt_Dir>/filters/Websphere.oif
  3. Check Disable JIT and type <OptIt_Dir>/lib/oibcp.jar in the Boot Classpath (Prepend) field.
  4. Click OK to close the Advanced JVM Settings dialog box.
  1. Click Apply to update the changes to WebSphere.

 

Starting WebSphere with Optimizeit

  1. For Windows machines only: Using the Optimizeit Audit System selector from the Windows tray, select which of the Optimizeit tools (Profiler, Thread Debugger or Code Coverage) you currently wish to use with WebSphere.

 

Note: If you have previously installed Optimizeit products, you must quit the Audit System Selector supplied with those products, and start the Optimizeit Audit System Selector supplied with this tool.

  1. For Unix machines only: Using the Optimizeit Audit System selector, select which of the Optimizeit tools you currently wish to use with WebSphere. The Optimizeit Audit System selector is a command located under <OptIt_Dir>/oiselector. It allows you to choose which Audit system should be run and which options should be used. In order to quickly configure, enter:
    <OptIt_Dir>/ oiselector -config
    This command starts an interactive configuration. More information is available when you type:
    <OptIt_Dir>/ oiselector -help
    Important: The configuration specified through the Audit System selector is stored in a file located under the HOME directory of the current user. For that reason, the oiselector command should be run as the same user as the one used to run the application server.
  2. Once you have selected the Audit System to be used, restart your Application Server.

 

Attaching from Optimizeit

Once WebSphere is running with the Optimizeit Audit System, you can launch Optimizeit and attach to the virtual machine.

  1. Ensure your application server is running, and that the application you want to profile is deployed and running.
  2. On Windows machines only, right-click the Audit System Selector icon on the taskbar, and choose Open the Audit System Selector.

 

Select the tab for your chosen tool, and click Start.

  1. On Unix machines, start Optimizeit.
  2. Optimizeit opens the Edit Settings dialog box. Click OK.
  3. Choose Program|Attach to open the Attach dialog box.
  4. Verify the host name and port number, and click Attach.

The default values for host name (localhost) and port number (1470 for Profiler, 1471 for Thread Debugger, and 1472 for Code Coverage) will work in most instances.

  1. When you are done monitoring activity with the application, detach Optimizeit from the application server (Program|Detach).

The application server is not affected by attaching and detaching Optimizeit.

 

 

2. WebSphere with DataSource

 

 Connection String
Oracle thinjdbc:oracle:thin:@orcl:1521:zlu
Oracle oci
  • jdbc:oracle:oci:@orcl:1521:zlu(for 10g)
  • jdbc:oracle:oci:@orcl(for 9i, you should configure a local service to point to the remote service)
Sybasejdbc:sybase:tds:localhost:5000/testdb
DB2 (Legacy jdbc type 2 for XA)

1. Database configure

    Because you want to use JDB2 type2 driver, so you must have a DB2 client on the same machine with the websphere.

    If you want to connect to a remote DB2 database, you need configure a local database which reference to the remote database using DB2 client tool.

2. Start WebSphere

Because you used the JDBC2 driver, you need to run a script named db2profile to configure some environment parameter before you start the WebSphere.

 Normally you can find that script at the {$db2-user-home}/sqllib folder.  After you have run that script, you can start the WebSphere

3. Configure Database

       When you create JDBC providers, you should choose DB2 Legacy CLI-based Type 2JDBC Driver.    

   Ok, that all.

DB2 (Universal jdbc type 2 for XA)
  1. DB2 Driver version can't be lower than 8.1.6
  2. set DB2_HOME/bin as lib path

 

 

3. WebSphere with JVM Arguments

 

 Configuration
Speak English

1, “Servers” -> “Application Server” ->"server_name"->“Server Infrastructure”-> “Java and Process Management”->“Process Definition”-> “Java Virtual Machine”->   Add value “-Duser.language=en” to property “Generic JVM arguments”.->restart WebSphere.

2, Change IE to show English UI of WebSphere, open IE, and go to “Tools” -> “Internet Options” -> “General”-> “Language”.-> “Add”.a new item “en-us”, and move it on the top of the list.

GC log-Xloggc:$SomeFolder/logs/callee.gc.txt

 

4. WebSphere with Default JMS Provider, JCA, and SIB

 

Default JMS Provider: WebSphere Application Server V6 supplies a preconfigured J2EE Connector Architecture resource adapter implementation that can be used to communicate with a service integration bus. This resource adapter is installed as a fully-integrated component of WebSphere Application Server V6, at all levels of the WebSphere cell, and needs no separate installation steps. The administered objects for this resource adapter also implement the corresponding interfaces of version 1.1 of the JMS specification. This enables them to the be used by JMS clients for both the point-to-point and Publish/Subscribe messaging models.

Default JMS Provider Configuration UI: A user friendly configuration tool to help you avoid directly configuring the JMS JCA resource adapter for JMS; yeah, you can configure JMS JCA resource adapter directly for your application

SIB: A service integration bus, or bus, within WebSphere Application Server V6 is simply an architectural concept. It gives an administrator the ability to group a collection of resources together that provide the messaging capabilities of the bus. At runtime, the bus presents these cooperating messaging resources to applications as a single entity, hiding from those applications the details of how the bus is configured and where on the bus the different resources are located. yeah, SIB holds physical resource located for JMS and some other Service.

Provider is interface, SIB is implementaton

Default JMS Provider Configuration UIWebSphere MQ JMS Provider

   ↓                                                         ↓

Default JMS Resource Adaptor,i.e, Default Provider

   ↓                                                         ↓

Destination <- SIB ->(foreign bus)->WebSphere MQ -> Destination

 

 

5. WebSphere with MQSeries

 

There are two way at least to configure applications running in WebShere Application Server communicating with MQSeries:
  1. Using WebSphere Default JMS Provider with foreign bus connected to MQSeries, which illustrated above.
  2. Using WebSphere MQ JMS Provider

Unlike the default messaging JMS provider, the WebSphere MQ JMS provider is not a J2EE Connector Architecture version 1.5 compliant resource adapter. It simply provides an implementation of version 1.1 of the JMS API, enabling JMS clients to communicate directly with WebSphere MQ.

 

6. WebSphere with JNDI

 

  • Compound name: cell/nodes/node1/servers/server1/ejb/webbank/Account
  • Corbaname: corbaname::myhost1:9812/NameServiceServerRoot#ejb/webbank/Account
Using an IIOP URL
  • java.naming.provider.url=corbaloc:iiop:myhost.mycompany.com:2809
  • java.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory
Using a CORBA object URL from a non-WebSphere JNDI, To access a WebSphere name server from a non-WebSphere environment, such that the WebSphere initial context factory is not used, a corbaloc URL must be used that has an object key of NameServiceServerRoot to identify the server root context.
  • env.put(Context.INITIAL_CONTEXT_FACTORY, "com.somecompany.naming.TheirInitialContextFactory");
  • env.put(Context.PROVIDER_URL, "corbaname:iiop:myhost.mycompany.com:2809/NameServiceServerRoot");

 

7. Misc

 

 Configuration
Run Scriptfor %%v in ("*.jacl") do wsadmin -host 192.168.0.3 -port 8880 -f %%v
Provider Endpoint in Non -Bootstrap ServerUse the provider endpoints property to configure the bootstrap servers to
which a connection factory can connect. The provider endpoints property of the connection factory allows an administrator. to specify a comma-separated list of suitable bootstrap servers for the connection factory. Each bootstrap server in the list is specified as a triplet of the form: hostname : port : transport chain, e.g."boothost1:7278:BootstrapBasicMessaging"
Console Session

Servers -> Application Server -> server name -> Web Container -> Session Management: By default the value is 30. You can change it to -1(never time out) or 10000.

Remove Timer in WebSphereIf the timer in WAS has exception, it always appear even you reinstall your application or restart WAS. Steps to remove it:
  1. Stop WAS
  2. Run “$WAS_HOME/cloudscape/bin/embedded/cview.bat”
  3. Open the database in“$WAS_HOME/profiles/default/databases/EJBTimers/server1/EJBTimerDB”
  4. delete data in table EJBTIMER_TASK
  5. Restart WAS
Don't start application with WebSphere

By default, an application will start when the server starts. However, you may not want all the applications to start immediately, because the applications you no longer use consume resources, or you may not need to run them. The only way to prevent this is to disable the application from running on the server.

a. Select Applications -> Enterprise Applications

b. Click the application to open the configuration.

c. Select Target Mappings in the Additional Properties table.

d. Select the server for which you want to disable the application.

e. Deselect the Enable option and click OK.

f. Save the configuration.

 
Environment VariableIf you are on windows platform, after you installed some software, such as Oracle or DB2, you should restart your machine to make the change of some environment variables such as ${PATH} visible to WAS, then WAS can use the native libraries you just installed.

   

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值