Concerns and issues relating to all versions of WebSphere Application Server
In case you missed it WebSphere Application Server V8.0 Fix Pack 1 NOW AVAILABLE!
http://t.co/3w9K7x0A
This is an absolute MUST-HAVE if you are deploying your application to WAS 8.
List of fixes is found
http://www-01.ibm.com/support/docview.wss?uid=swg27022958
There are a lot of fixes and enhancements in multiple component areas.
This is absolutely critical if you are having any issues with your WAS 8.0.0.0 install
Some of the fixes to skip directory and zip archive scanning will speedup app deploy and reduce footprint.
There are a lot of enhancements and ease of use fixes like these in 8.0.0.1.
Go get it today!Labels: debugging
Customers use the wsadmin task (ant XML or
programatically) to execute the WebSphere command-line administration tool with the specified arguments.
To use this task, add the following to your Ant build.xml
<taskdef name="
wsadmin" classname="
com.ibm.websphere.ant.tasks.WsAdmin"/>
WsAdmin ant task supported arbitrary -X arguments to the task's forked JVM by directly adding them to the build.xml :
<wsadmin script="${basedir}/script.py"> ...
<arg value="blah" />
<jvmarg value="-XX:MaxPermSize=128m"/>
</wsadmin>
You can also do this programatically directly by using
WsAdmin task. You will need to setup classpath similar to how it is set for the wsadmin ant task. Modify WAS_HOME/bin/ws_ant.bat/sh script to setup the classpath for your custom task.
WsAdmin task = new WsAdmin();
if (forceConnType != null) {
System.out.println("forcing connection type to: "+forceConnType);
task.setConntype(this.forceConnType);
} else {
task.setConntype(this.conntype);
}
task.setLang(this.lang);
task.setUser(this.getWasuser());
task.setPassword(this.getWaspassword());
task.setScript(jFile.getAbsolutePath());
if (com.ibm.ws.ant.utils.OsUtils.isSolaris()
|| com.ibm.ws.ant.utils.OsUtils.isHPUX()) {
//increase permgen space on solaris/hp-ux
task.createJvmarg().setValue("-XX:MaxPermSize=512M");
}
task.setJvmMaxMemory("1024M");
task.execute();
Labels: admin
http://www.ibm.com/developerworks/websphere/downloads/ffdc_browser.html
Provides greater accessibility to FFDC logs in an organized and easy to use fashion.
Simplifies the process of locating, accessing and displaying FFDC log contents.
Works in both distributed and zOS environments.
Works in Base, ND, Clustered and Secure topologies.
Direct access from any web browser, provides remote access to the WAS log files-
- No need to incur the overhead of more heavyweight tools to view logs, e.g. admin console
Realtime tool: dynamically accesses content from live WAS system
Very small application footprint: solely servlet based
- Can be run during stress with minimal or no impact
Developed out of a need to get to FFDC and system log files without the use of the admin console, FTP clients or complicated file system navigation.
Labels: serviceability
I have uploaded an utility Dynacache management
script to
github that runs on the Deployment Manager, and for each application server on each node, calls clearCache for a set of cache instances. This script can probably run at midnight when you want to flush your entire cache.
Kevin Grigorenko from the WAS SWAT team wrote this script. Thanks Kevin!
Labels: dynacache
Today's blog post is a gem from WAS Senior Software Engineer Fred Rowe. We often get questions related to malicious data source access. Some these include how users with wadmin can access be prevented from gathering or pulling datasource credentials for database access. How to segment the access from intentional and un-intential access to customer data.
There are two primary ways to secure WebSphere datasources, each method has a user name and password associated with it. In both cases, if displayed from either the admin console or wsadmin, the password value is either:
- obscured by dots
- obscured by asterisks
- displayed in encoded form
1. Using datasource custom properties:
This method is vendor-specific based on the JDBC provider associated with the datasource. Typically, JDBC drivers support the custom properties userand password. If a custom property named password is created, it's value will be obscured in the WAS admin console
Data sources > datasource_name > Custom properties list page as follows:
Note that the property named pwd is not obscured. Similarly, on the WAS admin console Data sources > datasource_name > Custom properties > password details page, the XOR-encoded version of the password is displayed:
And finally, if the password property is examined from wsadmin, the XOR-encoded version of the password is displayed:
wsadmin>pwd = AdminConfig.getid("/DataSource:datasource_name/J2EEResourcePropertySet:/J2EEResourceProperty:password/")
wsadmin>print AdminConfig.showAttribute(pwd, "value")
{xor}MiYvPiwsKDAtOw==
2. Using JAAS - J2C authentication aliases:
If a JAAS auth alias is created for the datasource, the password of the alias is obscured on the WAS admin console Data sources > datasource_name > JAAS - J2C authentication data > myAlias details page:
Similarly, if the value of the password attribute of an auth alias object is examined from wsadmin:
wsadmin>print AdminConfig.getid("/JAASAuthData:/")
wsadmin>print AdminConfig.showAttribute(authAlias, "password")
*****
Labels: data access
WebSphere Application Server V8 adds improved high availability
(HA) support in several scenarios, including:
- Resource failover and retry logic
for relational data sources and JCA connection factories, where the
administrator can tailor the data sources and connection factory
configuration based on application need to specify:
- Number of connection retries.
- Alternate/fail-over resource.
- Pre-population of alternate/fail-over resource connection pool.
Resource Workload Routing is a new feature exclusive to the WebSphere Application Server that enables applications to easily recover from
resource
outages, such as database failures, without requiring you to embed
alternate
resource and configuration information.
Resource workload routing includes data source and connection factory fail over and
subsequent fail back from a predefined alternate or backup
resource. You can tailor the
resource fail over and failback flexible configuration options to
meet your environment-specific and application needs.
new
On distributed systems, you can enable resource routing by configuring an alternate resource.
A data source and connection factory can fail over and fail back automatically when a specified or default failure threshold value is reached. When fail over occurs, the application switches from using the primary resource to using the alternate resource. Fail back occurs when the application switches back from the alternate resource to the primary resource.
Implementers of Resource Adapters take note - Fail over works with non-relational
resource adapters that have a ManagedConnection object that implements
a testConnection method.
Instead of rolling your own architecture and policy for outbound resource fail over please leverage this in-built resource routing High Availability function to prevent disruption to end users.
Labels: failover
Please look at this excellent WSTE session by Kevin Grigorenko that covers native
memory issues for WebSphere Application Server, particularly native
OutOfMemoryErrors and leaks on Windows.
It covers theory, detecting and
monitoring, isolating and avoiding, and finally analyzing leaks with
UMDH, LeakDiag, DebugDiag, VMMap and windbg.
Windows Native Memory Problem Determination Techniques and Tools for WebSphere Application Server -
http://www-01.ibm.com/support/docview.wss?uid=swg27021906
To replay the recording of this 46 minutes Webcast, click on
Download Audio (5.0MB - audio in MP3 format) then open the
PDF file
Labels: WSTE
Is there a minimal trace string to view SQL statements being executed by an application running on WebSphere Application Server?
Answer
If the application uses
java.sql.PreparedStatement objects, then there is a relatively
lightweight way to obtain the SQL statements being executed.
PreparedStatement objects are often used in applications because of
their performance over regular java.sql.Statement objects.
To
view the SQL statements being executed using a PreparedStatement
object, enable WebSphere tracing for the class that implements
java.sql.PreparedStatement:
com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement. The corresponding trace specification is:
com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement=all
Examples:
Consider the following sample SQL INSERT statement being executed from the application using a java.sql.PreparedStatement:
String insertCoffeeSaleString
= "INSERT INTO SALES(ITEM_NAME,QUANTITY,PRICE) values('Coffee',5,1.25)";
PreparedStatement insertCoffeeSale
= connection.prepareStatement(insertCoffeeSaleString);
insertCoffeeSale.executeUpdate();
With
com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement=all trace enabled, the following output can be seen when the Prepared Statement is initialized:
Trace: 2011/04/07 14:37:12.100 01 t=6C9020 c=UNK key=P8 (13007002)
ThreadId: 0000002b
FunctionName:
SourceId: com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement
Category: FINER
ExtendedMessage: Entry;
org.apache.derby.impl.jdbc.EmbedPreparedStatement30@401c401c,
com.ibm.ws.rsadapter.jdbc.WSJdbcConnection@3
c4a3c4a, HOLD CURSORS OVER COMMIT (1), PSTMT: INSERT INTO SALES (ITEM_NAME,QUANTITY,PRICE) values('Coffee',5,1.25) 1003 1007 1 0 0
Labels: debugging