Thursday, December 4, 2008
copy a cluster
The approach I would take is...
Copy the WAS Install DIR from one machine to the other (be sure to include the profiles directory -- profiles don't necessarily exist under the WAS Dir)
Copy the WC Install Dir from one to the other (be sure to include the instances directory)
Do a search/replace within all files under those directories.
replace any instances of the IP address of the old with the new machine's IP
replace any instances of the hostname of the old with the new machine's hostname
Since you are federated, you should repeat the search/replace for all machines using all hostnames and IPs since machine1 could have a config file that points to machine 2.
Remember most of this stuff is NOT a commerce thing, but a WAS thing. WAS does not provide utils to "copy/move" profiles
Remember that this has not been tested by anyone here so your mileage may vary.
Monday, November 17, 2008
J2EE classloder
Delegation Principle: If a class is not loaded already, the classloaders delegate the request to load that class to their parent classloaders.
Visibility Principle: Classes loaded by parent classloaders are visible to child classloaders but not vice versa.
Uniqueness Principle: When a classloader loads a class, the child classloaders in the hierarchy will never reload that class.
Wednesday, November 12, 2008
Wednesday, November 5, 2008
Tuesday, November 4, 2008
Friday, October 24, 2008
WASUpdater trace
Thursday, October 23, 2008
Toolkit recovery tips
- In the Project Explorer, expand Enterprise Applications --> WC
Right-click on the WC project and select 'close'
Stop the server
Right-click on the WC project and select 'open'
Right-click on the WC project again, and select 'refresh'
In the Projects menu, make sure 'Build Automatically' is selected, then select 'Clean'- Ensure 'Clean all projects' is selected, then click 'ok'
Start the server
Right-click the Test Server, select 'add/remove projects' and add the WC application- if publishing does not start, click the 'publish to server' icon in the Servers View Tab- Stop the server and close RAD
Backup the
Delete the
Backup the
Delete the
CD into
Run setup.bat
Open RAD and start the server
Check the console for 'Application Started: WC'
If it's there, you are good to go; if not, click the 'publish to server' icon in the Servers View Tab
Tuesday, October 21, 2008
Monday, October 20, 2008
Thursday, October 16, 2008
How to use Java Logger
private static final String CLASSNAME = WASUtil.class.getName();
private static final java.util.logging.Logger LOGGER =
java.util.logging.Logger.getLogger(CLASSNAME);
2. Log trace on your specified level
LOGGER.log(Level.FINE, "profile name: "+name);
3. Enable the trace to a benchmark level. For example, for a standalone program,
you can enable trace by modifying
java.util.logging.ConsoleHandler.level = ALL
com.yourcompany.yourclass.level=FINER
will trace all the entries with trace level higher than FINER, ie, FINE, CONFIG, INFO.
Change datasource password in a clustered env.
Based on my quick analysis of the code yes, we will use the WAS APIs to modify the datasource password a per module basis. The password will be stored in the ibm-ejb-bnd.xmi file for each EJB module in directories as you have mentioned below.Does WAS need to be running? If you are federated to a DMGR, yes we will connect to the DMGR process and ask it to do the configuration changes. If not federated, we will not connect to any process. The WAS APIs we use will update the files directly on the file system without connecting to any WAS server.A bit of background:The datasource itself can have a default password.This password can be overridden at the MODULE levelThis password can also be overridden at the BEAN level.Config manager sets the password at the MODULE level in 5.6.x (WAS5AdminClient.mapEjbsToDataSource(). (6.0 is different)
Clean connection pool
The immediate purge pool option should only be used if the database is down. To use the Mbean operation purgePoolContents, you must use wsadmin commands. The purgePoolContents is a DataSource or J2CConnectionFactory Mbean type .
View the following wsadmin example, assuming that the data source name is mydatasource:
%WAS_HOME\bin\wsadmin
set ds [$AdminControl queryNames *,type=DataSource,name="mydatasource"]
$AdminControl invoke $ds purgePoolContents [normal immediate]
