EJB Timer when redepolyed in a cluster environement of Websphere Application Server

EJB timers are not removed when the application is removed. Some options:

  1. Use the WAS_HOME/bin/cancelEJBTimers command to remove them
  2. Add startup logic to your application to cancel/recreate timers as needed.
  3. Use automatic timers (@Schedule) in 8.0+. In this case, the server automatically creates the timer when the application is first started, and it will attempt to remove them when the application is uninstalled. See the InfoCenter for more information:

http://stackoverflow.com/questions/20217355/ejb-timer-when-redepolyed-in-a-cluster-environement-of-websphere-application-ser

CLUSTERING IN WEBSPHERE APPLICATION SERVER

Clustering is a very critical aspect of any middleware enterprise application. It provides capabilities of high availability by providing fail over and load balancing mechanism.
This post is a sample demonstration of configuring a cluster in WebSphere Application Server Network Deployment 7.0.
Prerequisites:
Deployment Manager Profile created using profile management tools.
Steps:
1. Create Cluster definition.
Log into WAS Admin console — > Servers — > Clusters — > WebSphere application server clusters.
Clustering in WebSphere
Clustering in websphere

Clustering in websphere
2. Create cluster members.
Provide the details about the cluster members.
Clustering in WebSphere
Define the node on which the cluster member would reside.
Also define whether the server would be generated based on a server template.
You can add additional members to the cluster.
Clustering in WebSphere
Cluster-Complete
Once the cluster is created successfully, it would be in stopped state by default.
3. Make sure the node agent is started.
Go to System administration from left panel — > Node agents — > Check the status.
Clustering in WebSphere

Clustering in WebSphere
If the Node Agent is not  started, you can execute the below script to start the same.
WAS_HOME/profiles/YOUR_PROFILE_NAME/bin/startNode.cmd
4. Start the cluster.
Cluster-Start
Further reading:
Some common issues while configuring a cluster in WebSphere Application Server.
Issues:
1.
Cluster member MyServer1 will not be started because the Node Agent on node Node02 is not active. Cluster members can be started individually from the cluster member collection panel.
Remedy:
Make sure you start the Node Agent.
2.
The node agent on node Node02 must be started to perform the restart operation. Node agents in stopped state cannot be started from the console.
Remedy:
You would need to start the node agent from command line as below.
WAS_HOME/profiles/YOUR_PROFILE_NAME/bin/startNode.cmd
3.
Caused by: com.ibm.websphere.management.exception.AdminException:ADMU7707E: Failed while trying to determine the Windows Service name for server: nodeagent; probable error executing WASService.exe: com.ibm.websphere.management.exception.AdminException: ADMU7709E: Unexpected exception while processing server: nodeagent; exception = java.io.IOException: Cannot run program “D:\Softwares\bin\WASService.exe”: CreateProcess error=740, The requested operation requires elevation.
Remedy:
Check whether the node agent service is present or not. If not create a node agent service as below.
WAS_HOME\bin> wasservice -add Dmgr01_NodeAgent
-servername server1 -profilePath “D:\Softwares\profiles\Dmgr01″
-wasHome “D:\Softwares” -logFile “D:\Softwares\profiles\Dmgr01\logs\nodeagent\startNode.log”
-logRoot “D:\Softwares\profiles\Dmgr01logs\nodeagent” -restart true -startType automatic
4.
The node LTADKAW7Node01 is not synchronized with the master configuration. This may prevent cluster member MyServer1 from starting correctly.
Remedy: Synchronize the node.
Cheers,
Wonders team :-)

WebSphere basics

If you are not familiar with the basic concepts upon which WebSphere operates, then read on…
There are many components in a WebSphere environment and it’s not difficult to get confused about how they relate to each other. Our Solution uses the basic concepts of Cell, Node, and Server to serve up the WebSphere data and open the window to where the data lies hidden.
WAS architecture.jpg
We will quickly review some of the basic concepts of cell, node, server, and so on.
  • An Application Server
 in this context is a single WebSphere application server,
  • server is a runtime environment. Servers are Java process responsible for serving J2EE requests (for example, serving JSP pages, serving EJB calls, consuming JMS queues, and so on).
  • The Admin Console 
is a browser based application that is pre-installed in your WebSphere environment that enables you to manage your application servers and applications.
  • cell is a grouping of nodes into a sigle administrative domain. For WebSphere this means that if you group several servers within a cell, then you can use one admin console to administer them.
  • Network Deployment Manager
 is an application server running an instance of the Admin console. You have administrative control over all other app servers in the same cell.The Deployment Manager is a process (a special WebSphere instance) responsible for managing the installation and maintenance of Applications and other resources related to a J2EE environment. It also maintainins user repositories for authentication and authorization for WebSphere and other applications running in the environment. The Deployment Manager communicates with the Nodes through another special WebSphere process, the Node Agent.
  • node is a grouping of servers that share common configuration on a physical machine. It is comprised of a Node Agent and one or more Server instances. Multiple WebSphere nodes can be configured on the same physical computer system.
  • The Node Agent is the administrative process responsible for spawning and killing server processes and also is responsible for synchronizing configuration between the Deployment Manager and the Node. Note that multiple WebSphere nodes can be configured on the same physical computer system. A single Node Agent supports all application servers running on the same node.
  • Clusters are virtual units that group Servers. They can contain multiple instances of the same application server and can span multiple nodes. Resources added to the Cluster are propagated to every Server that makes up the cluster, This usually affects the nodes in the server grouping.

WAS v6.1.x fails to start with error ADMU7704E: Failed while trying to start the Windows Service

Technote (troubleshooting)

Problem(Abstract)

Attempts to start IBM WebSphere Application Server (WAS) v6.1.x through Rational Application Developer for WebSphere Software (RAD) v7.0.x results in the error ADMU7704E: Failed while trying to start the Windows Service associated with server.

Symptom

Complete error while starting WebSphere Application Server (WAS) v6.1.x:

ADMU7704E: Failed while trying to start the Windows Service associated with server: server1;
probable error executing WASService.exe: Starting Service: [service name]
Timed out waiting for service to respond to command, after 60 seconds.Failed to start service, or
timed out while waiting for start to complete. Check the logs for details.

Cause

The server was configured as a Windows Service.

Resolving the problem

If this was unintentional, create a new server profile that does not run the application as a Windows Service.
Steps describing how to do this can be found in the Related URL section.

Alternatively, you can do the following:

  1. Open Windows Services Control Panel (Start > Settings > Control Panel > Administrative Tools > Services).
  2. Look for the service name of WAS V6.1:

    “IBM WebSphere Application Server V6.1 – [service_name]”.

  3. Open a command window and go to [RAD_Installation]\runtimes\base_v61\bin
  4. Run the command:

    WASService.exe -remove [service_name]

    You should see a message “Successfully removed service”.

Restart RAD and you should now be able to successfully start your WASv6.1.x server.

Related information

How to determine the Application Server V6.1 Base and Network Deployment Java bit-depth on AIX, Windows, Linux

The output of “java -version” of an IBM JDK provides the info which bit-depth is installed. If we have a 64-Bit java installed, the output will contain the “64” to indicate this. Example on AIX:
    -bash-3.00$ ./java -version
    java version “1.5.0”
    Java(TM) 2 Runtime Environment, Standard Edition (build pap64devifx-20071025 (SR
    6b))
    IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 AIX ppc64-64 j9vmap6423-20071007 (JI
    T enabled)
    J9VM – 20071004_14218_BHdSMr
    JIT – 20070820_1846ifx1_r8
    GC – 200708_10)
    JCL – 20071025
    -bash-3.00$


This is valid for all IBM JDKs. Please see as well TechNote 7005002.

Starting and stopping the WebSphere Application Server node agent

Starting and stopping the WebSphere Application Server node agent is accomplished by using the startNode and stopNode commands.
Procedure
  1. AIXLinuxSolaris To start or stop the WebSphere Application Server node agent:
    1. Ensure that you are logged in as the non-root user ID created before installing WebSphere Commerce.
    2. Ensure that your database management system is started.
    3. Enter the following commands in a terminal window:
      su - non_root_user
      cd WC_profiledir/bin
    • To start the node agent, enter the following command: ./startNode.sh
    • To stop the node agent, enter the following command: ./stopNode.sh
  2. Windows To start or stop the WebSphere Application Server node agent:
    1. Log on using Windows user ID with Administrator authority.
    2. Start a command prompt session.
    3. Issue the following command: cd WC_profiledir/bin
    • To start the node agent, enter the following command: startNode
    • To stop the node agent, enter the following command: stopNode

WebSphere Application Server Tutorial and FAQ — WAS in 5 Minutes

If you’re developing applications for WAS and you’re new to it, this is what you need to know:
  • What is the default URL of the admin console. https://$hostname:9043/ibm/console.
  • What are the default portsHTTP: 9080, HTTPS: 9443.
  • How to locate the logs. Logs can be found under$install_root/profiles/$profile_name/logs/$server_name. The default profile name is AppSrv01 and the default server name is server1. Example:/usr/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/server1. SystemOut.log is the file containing everything that was logged to standard out. Logs can also be viewed from the admin console by navigating to Troubleshooting/Logging and Tracing/server_name/Runtime.
  • How to start/stop a server. If you’re dealing with a “Network Deployment” type of installation (multiple application servers running under the control of the “deployment manager”), your can start/stop a server from the console (Server/Server Types/WebSphere application servers). Otherwise you have to do it from command line. Go to install_root/bin and run./startServer.sh server_name, e.g., ./startServer.sh server1 (this assumes that your installation has only one profile defined, otherwise you may need to “cd” to the profile_name/bindirectory). Make sure that you run all commands using the appropriate system account. To stop the server, run ./stopServer.sh server_name -username user_name -password password. user_name and password is the credentials of an admin account, typically the same one you use to login to the console.
  • How to deploy an application. In admin console, navigate to Applications/Application Types/WebSphere enterprise applications, click on “Install new application”, select “Fast path”, accept all the defaults except that on “step 2” make sure that you targeted correct servers (if you have multiple servers/clusters in your environment). Note that you can deploy a WAR file directly, you don’t have to build an EAR. In this case, make sure that you set a context root on “step 4” screen of the wizard.
  • How to change context root of a Web application. Go to Applications/Application Types/WebSphere enterprise applications/application_name/Context Root For Web Modules in the console. Re-start the application after the change.
  • How to change the order of classloaders. If you’re getting a ClassNotFoundException when you’re starting the app, changing the order of classloaders is the first thing you may want to try. Go to Applications/Application Types/WebSphere enterprise applications/application_name/Manage Modules/module_name and make the appropriate selection in the “Class loader order” drop-down (this assumes you’re doing it for a WAR module).
  • How to enable dynamic class reloading. If you need to frequently update your deployed application (e.g., you use a local WAS installation for development), enabling dynamic reloading could be a huge time saver. Go to your application in the console, “Class loading and update detection”, set “Override class reloading settings …” and set polling interval to 2 seconds. See this post for more details on how to configure your development environment to support class reloading.
  • How to find a host name and a port of the server. Go to Server/Server Types/WebSphere application servers. You’ll find the host name in the Host Name column. To find a port, click on your server, and expand Ports. WC_defaulthost is the HTTP port and WC_defaulthost_secure is the HTTPS port.
  • How to kill a JVM. If the normal “stop” routine failed to stop the server in a reasonable amount of time, you may need to kill it. In a “Network Deployment” environment, simply navigate to the list of servers, select the server and click “Terminate”. A node agent will kill the JVM for you. To achieve the same from command line (the only option if you’re running standalone), cd toinstall_root/profiles/profile_name/logs/server_name, and kill the process ID contained in the file server_name.pid. On Unix, you can simply do kill -9 `cat server1.pid` (assumingserver1 is your server name). Use task manager of taskkill /PID on Windows.
  • How to browse JMS messages. Go to Buses/Your bus name/Destinations/Your destination/Queue points/Your queue point/Runtime/Messages.
  • Where to find configuration filesWAS has many configuration file, most of them are in XML/XMI format. The files are located under$install_root/profiles/$profile_name/config/cells/$cell_name.

http://myarch.com/websphere-application-server-for-developers-in-5-minutes-or-less

How to Set Timezone on WebSphere Application Server

It’s actually quite easy, but a little tricky. This is how i do it,
1. Start the administrative console.
2. In the topology tree, expand Servers and click Application Servers.
3. Click the name of the application server for which you want to set the time zone.
4. On the application server page, click Process Definition.
Process Definition
5. On the Process Definition page, click Java Virtual Machine.
6. On the Java Virtual Machine page, click Custom Properties.
7. On the Custom Properties page, click New.
8. Specify user.timezone in the Name field and timezone in the Value field, where timezone is the supported value for your time zone.
9. Click Apply.
10. Save the configuration
In this example, i’m setting my timezone as Asia/Jakarta

user.timezone=Asia/Jakarta

Timezone Success http://edwin.baculsoft.com/2011/08/how-to-set-timezone-on-websphere-application-server/

WebSphere Application Server: Component vs Container Managed Authentication Alias

When defining the usage of an authentication alias in a resource in the administration console of WebSphere Application Server, there are two places the data can be specified:

  1. Component Managed Authentication
  2. Container Managed Authentication

Component Managed Authentication is used when the resource configured in the EJB’s deployment descriptor res-auth property is set to ‘Application’.
Container Managed Authentication is used when the resource configured in the EJB’s deployment descriptor res-auth property is set to ‘Container’.

http://blog.danzrobok.com/2008/10/09/websphere-application-server-component-vs-container-managed-authentication-alias/

How Do You Control WebSphere Application Server?

All application servers have an Admin Service. The Admin Service does just what the name implies. In most application servers, the admin service does a really good job of system administration for one application server. When you try to run five or ten application servers in parallel, things get flakey. WebSphere Application Server is really a network of servers connected by a network of management. This is what IBM means by “network deployment” or the initials ND. At any moment, some servers will be running, some servers will be stopped, and some servers will be in some in between state. Large, distributed networks are like that. If the network is large enough — we are talking tens of thousands of computers spread across several continents — just knowing what is running on any given part of your network becomes a chore. The admin service for WebSphere Application Server is meant to control everything in an extended network of thousands of servers. It is possible to control a network that large from one laptop computer located anywhere in the world. Everything means

  • configuration — the way the internal parts of WebSphere Application Server come to life when we start them
  • control — the way those internal parts behave after we start them
  • monitoring — reports and alerts we get

In order to understand how IBM administers the large network of servers that compose WebSphere Application Server, you have to understand some terms

IBM goes to great lengths to separate the actual code that executes from the settings that configure and control how that code behaves. Anything information that influences the way WebSphere Application Server behaves is isolated in something that IBM calls a profile. There is one profile for every node in the network of servers that we call WebSphere Application Server. Every time you create a profile, you have created a node. That node and the servers it contains might stand alone or it might be part of a collection of nodes that IBM calls a cell.
A node contains a collection of application servers and web servers that all happen to live on the same physical computer. One physical computer can contain many nodes as long as it has enough memory and enough CPU to power all the servers in all the nodes it contains. Every server in a node is guaranteed to live on the same physical computer.
An application server in the network of servers and services that we call WebSphere Application Server is Java Enterprise Edition platform code running on a Java Virtual Machine. That code produces dynamic content. This article describes how WebSphere Application Server produces dynamic content. Each application server has its own separate Java Virtual Machine. Sometimes, application servers are just called servers. Notice that any one application server is just a very small part of the product we call WebSphere Application Server. In the competing products, that application server is the entire product. Notice the difference in scale
A web server is a computer program that serves up static content. Sometimes, web servers are just called servers.
A cell is a collection on nodes. All the nodes could be on the same physical computer, but more likely, they will be on a network of physical computers
Configuration determines how all the application servers, web servers, message queues, and various internal services of WebSphere Application Server come to life. The configuration information that system administrators are allowed to modify is stored in a collection of XML files and properties files in the config directory of a profile.
XML files and properties files in the config directory of a profile define how the various servers and services in a node come to life. But those configuration files only get read once. They get read when a server or service is initializing. The moment initialization is complete, the XML files and the properties files are ignored. The only way to get a server to pay attention to changes you make in an XML file or a properties file is to stop the server and then start it again.
A network of JMX beans called MBeans control the way the network servers and services behave once they are running. Those same JMX beans also monitor the behavior of the servers and services while they execute.
Two kinds of specialized application servers enable us to configure, control, and monitor the behavior of the distributed network of servers and services that IBM calls WebSphere Application Server

A deployment manager is an application server that runs exactly one application — an application that manages the configuration and behavior of an entire cell. There is only one deployment manager in any cell. The deployment manager holds the official configuration records for every server and service in the entire distributed network that is part of a cell. When a deployment manager orders a node agent to change the configuration of its servers and services to match this master record, we say the deployment manager has performed a synchronization. Deployment managers only talk to node agents
A node agent controls, configures and monitors all the servers and services in a node. Node agents talk to a deployment manager and node agents talk to the servers in their node. They relay administrative traffic from the deployment manager to the individual servers in their node. They relay status from the servers in their node to the deployment manager.
MBeans do several things

  • They simple pieces of Java code that can represent an application, a service, a server, or almost anything else in your enterprise.
  • They can report the status of anything in the enterprise
  • They can generate alerts concerning anything in the enterprise
  • They can be created automatically by WebSphere Application Server on behalf of anything installed in a cell

This thing we call WebSphere’s admin service is really a network consisting of the various MBeans, the node agents, and the deployment manager. There are three fairly thin facades to the admin service

  • a web browser based graphic user interface called the admin console
  • a command line shell called wsadmin. This shell has a very powerful scripting language
  • any JMX clients that you might choose to write

If you have never used WebSphere Application Server before, the web browser based admin console is a very good way to learn basic setup and administration. There are limits to what you can do from the admin console. Depending on what you want to do, navigation can either be very easy or very hard. The admin console page that allows you to change JVM heap size is burried deep in the navigation tree of each server. If you want to change heap size for ten servers, you must navigate that tree for each of your ten servers. That can be a lot of tedious mouse clicks.
Once you know what you are doing, wsadmin becomes more attractive than the admin console for many administrative tasks. For one thing, the script language of wsadmin allows you to automate tasks. Once your network reaches a certain size, the admin console becomes a source of errors because of the large number of mouse clicks you must make and the amount of text entry you must provide. Again, the script language provides ways to automate tasks
The most powerful way to control the network of servers and services we call WebSphere Application Server is to write a JMX client. JMX clients have complete unfettered access to the entire admin service and everything that happens across the entire network.

http://www.edu4eng.com/articles/WAS/overview/control.html