About Me

About Me
Working with SOA technologies , implementing solution using IBM BPM , IBM Integration Designer,IBM WODM and IBM DataPower

About me

View Mahesh Dondeti's profile on LinkedIn

upcoming posts on IBM Bluemix,Devops,Worklight,Node js.

Saturday 13 October 2012

Publishing failed when connecting from WID to remote WPS server

In case you wanted to publish your applications directly from WebSphere Integration Developer to the remote WebSphere Process Server you might have come across the situation where you are able to add a remote server in your WID environment but when you try publishing your projects to the server, you receive the following error: “Failure uploading archive to server”.



It is a simple issue but it can take a lot of time to solve it if you don’t know where to look and I must say that the above message isn’t the most informative one I’ve ever seen. However, I have discovered that this happens if your server is not a member of domain at the time of installation and WID is unable to recognize the hostname, written in the configuration file. To change this hostname, carry out the following procedure on the server-hosting machine:
1.       Open serverindex.xml file in text editor. You will find this file in folder <WAS_HOME>\profiles\<PROFILE_NAME>\config\cells\<CELL_NAME>\nodes\<NODE_NAME>\serverindex.xml
2.       ServerIndex element has an attribute called hostName, which might have an invalid value (requires a valid domain name or IP address). In our case we correct this value from
<serverindex:ServerIndex xmi:version=”2.0″ xmlns:xmi=”http://www.omg.org/XMI” xmlns:serverindex=”http://www.ibm.com/websphere/appserver/schemas/5.0/serverindex.xmi” xmi:id=”ServerIndex_1″ hostName=”orange“>
to
<serverindex:ServerIndex xmi:version=”2.0″ xmlns:xmi=”http://www.omg.org/XMI” xmlns:serverindex=”http://www.ibm.com/websphere/appserver/schemas/5.0/serverindex.xmi” xmi:id=”ServerIndex_1″ hostName=”orange.cloud.si“>
3.       Restart the server.
4.       Try publishing your project to the server once again, this time it should work!

 




Increasing the JVM heap size in WID (or any other Eclipse based tool)

We have identified some problems that may arise from too small heap size for our server. Same thing can occur in our development tools based on Eclipse such as WebSphere Integration Developer.
JVM heap size for such tools can be increased through standard Eclipse approach (documented here). Basically for WID, you can add command line parameters to the WID shortcut:
-vmargs -Xms[###]M -Xmx[###]M

where [###] is replaced by heap size in megabytes.
These values can be also edited in eclipse.ini configuration file located in the same folder as wid.exe where WID shortcut points at.
In our experience 768 MB is enough for initial heap size and 1536 MB for maximum heap size for the most memory expensive operations such is working with WebSphere Business Services Fabric Toolkit.
You can monitor heap size and start garbage collection at any time with heap monitor. In WID, from the Window menu select Preferences / General and check the Show heap status checkbox and click OK. You will get heap monitor as shown in the image below:



Increasing the JVM heap size in WAS7

Intensive use of WAS7 often slows down the server because of too often garbage collection. Most frequently this situation arises when WAS profile is augmented with at least two products, i.e. WPS and Monitor or WPS and Fabric. This situation can be avoided by increasing the JVM heap size. JVM heap size can be increased through administrative console or by using scripting.
In the administrative console click:
Servers > Server Types > WebSphere application servers >  SERVER_NAME > Server
Infrastructure > Java and process management  > Process definition > Java Virtual Machine

Set Maximum heap size field to desired value. Restart the server to bring in effect the value you set. Recommended value for maximum heap size by IBM is:
MaximumHeapSize = TotalRAM / 2 / NumberOfServers

JVM maximum heap size can be also set by scripting through wsadmin tool (heap size is in MB):
  • Jython:
AdminTask.setJVMMaxHeapSize('-serverName YOUR_SERVER_NAME
-nodeName YOUR_NODE_NAME -maximumHeapSize DESIRED_HEAP_SIZE')

  • JACL:
$AdminTask setJVMMaxHeapSize {-serverName YOUR_SERVER_NAME -nodeName YOUR_NODE_NAME -maximumHeapSize DESIRED_HEAP_SIZE}
In our experience 1536 MB is enough for testing purposes on WPS+Monitor or WPS+Fabric combinations.

 

High Performance Extensible Logging

HPEL or High Performance Extensible Logging is a new feature of IBM WebSphere Application Server version 8.0. It provides efficient logging and tracing utilities for storing and accessing log, trace, system.err and system.out data. It is an alternative to java.util.logging logger that was used as a logging utility on WAS.
HPEL stores and processes log and trace records in a binary form which is the main reason for its efficiency. As you can see in the figure below (source IBM Publib), primarily HPEL engine forwards streams into two repositories (log and trace). Text format is also supported but should be disabled when performance is a key concern.


If we want to use HPEL we must firstly enable it and secondly configure it.
By default HPEL is disabled since java.util.logging logger is still the default logger (as it was on previous WAS versions). We can enable HPEL (and disable java.util.logging logger) through IBM Admin Console > Troubleshooting > Logs and Trace > our server > »Switch to HPEL«.
We can separately configure (log directory, buffering, log record size and age, etc.):
  • HPEL logging
  • HPEL trace
  • HPEL text log
HPEL log and trace records can be accessed with a provided Log viewer (command line interface and admin console) that supports search, queries, filters, tail, inclusion/exclusion of specific loggers, etc. Here we can see Log Viewer in action (log list and log record details):





 
We can read HPEL logs and trace also programmatically (figure below – source is IBM Publib). We can read our log and trace records from repositories with wsadmin script (HPELControlService JMX MBean) or with custom Java program (HPELControlService JMX MBean or HPEL API).



 
In my opinion HPEL can be very useful, especially when we need to log very frequently. IBM has provided us with a very useful and powerful Log Viewer and API so we could develop custom applications for transformation, propagation or analysis of log/trace records.


Refreshing people queries in WebSphere Process Server and CRON schedules

WebSphere Process Server caches information from external people directory such as LDAP. When you use such a directory, changes to it are not reflected immediately in the Process Server. Process Server cache can be refreshed manually (e.g. for development and urgent purposes) or automatically (e.g. for regular operation).
To manually refresh people queries, in the administrative console click:
Servers > Server Types > WebSphere application servers >  SERVER_NAME > Configuration tab >
Business Integration > Business Process Choreographer > Human Task Manager > Runtime tab >
Refresh People Queries button

To set automatic refreshing of people queries, you can set CRON schedule  under the (on the same tab the Refresh People Queries button is):
Servers > Server Types > WebSphere application servers >  SERVER_NAME > Configuration tab >
Business Integration > Business Process Choreographer > Human Task Manager > Runtime tab >
People resolution > People query refresh schedule
The default value of People query refresh schedule is “0 0 1 * * ?”, which causes a refresh every day at 1:00 AM. The format is:
second minute hourOfDay DayOfMonth Month DayOfWeek

Every of the above can be:
  • * (all values apply)
  • Numbers separated with commas (only certain values apply, e.g. 1,3,5)
  • Ranges (specified with hyphen and separated by commas, e.g. 1-3,7-9)
  • Increments with offset till maximum allowed value (e.g. 6/10, where 6 is offset and 10 increments, which is valid for values 6,16,26,36,46,56, because 59 is the maximum value for minutes)
  • Increments inside a range (e.g. 15-25/4, where increments of 4 inside a range from 15 to 25, which is valid for values 15,19,23)
  • ? (value is discarded; DayOfWeek and DayOfMonth cannot be specified at the same time, so one of them must have value of ‘?’).
The numbers can be replaced with symbols when naming days (MON,TUE,WED,THU,FRI,SAT,SUN) or moths (JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC). There are several other possible options when using CRON calendar



com.ibm.websphere.scheduler
Interface UserCalendar

All Superinterfaces:
javax.ejb.EJBObject, java.rmi.Remote

public interface UserCalendarextends javax.ejb.EJBObject
The remote interface for all UserCalendar stateless session beans. All calendars are required to use this remote interface and the be com.ibm.websphere.scheduler.UserCalendarHome home interface.
One calendar session bean can implement one or more physical calendars. Each calendar implementation is identified using a the calendar specifier string. The calendar specifier for the supplied default calendars are not case sensistive. It is recommended that all UserCalendar implementations use case insensitive calendar specifiers.
The default UserCalendar supplied with the WebSphere Scheduler implements two types of calendars:
  • A cron-like calendar.
  • A simple arithmetic calendar.
The default calendar is accessed in one of two ways:
  1. When creating a TaskInfo object, if the setUserCalendar is not set, then the default UserCalendar described here is implied.
  2. Lookup the default UserCalendar using the JNDI name: com/ibm/websphere/scheduler/calendar/DefaultUserCalendarHome
CRON Calendar
The CRON calendar is named 'CRON'. When the calendar specifier string is CRON then the interval is calculated using a cron based scheme. A cron based interval looks like a list of term expressions seperated by spaces or tabs. Each term represents an element of the time. The element describes the valid values for that term. The next time is calculated by moving the lowest term to the next valid value for that term. If the value wraps then we move up to the next term and do the same.
Note that whilst seconds can be specified, the scheduler is not designed to be accurate to the second so we only recommend intervals at least a minute apart. We therefore recommend the seconds term is always 0
second minute hourOfDay DayOfMonth Month DayOfWeek
All terms except for day of week are very similar in syntax. Here are examples of the syntax:
  • *
    This indicates all values are acceptable. The interval simply includes all valid numbers.
  • 1,4,7
    This indicates only the specified values are acceptable.
  • 1-4,10-20,25
    Ranges can be specified for the comma delimited terms.
  • 4/5
    This indicates all values starting at 4 incrementing by 5 at a time up to the maximum permissable value. For example, for hours, the resulting sequence is [4,9,14,19,4,9,...]
  • 1-10/3
    This indicates all numbers inside the range skipping 3 at a time, in this example, this is [1,4,7,10].
The numbers can be replaced with symbols. The month term can be one of JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV or DEC. Example:
FEB,JAN-DEC/3 is the same as [JAN,FEB,APR,JUL,OCT]
The day of week and day of month terms cannot be specified at the same time. One must be a '?' and the other a term.
Examples of intervals.
  • 0 0 18 ? SEP MON-FRI
    This means at 1800 hours from Mon to Fri during Sept only. Note the day of month is a '?' as we specified a day of week.
  • 0 0 18 L * ?
    This means 6pm on the last day of every month (Jan 31, feb 28, Mar 31, etc) taking in to account leap years also.
  • 0 1/17 9-18 ? * MON-FRI
    This means from Monday to Friday from 9 until 1800 hours every 17 minutes starting at the first minute (9:01,9:18,9:35,9:52,10:01 etc). Note that ? was used for the day of month as we specified a day of week. It's also important to note that this isn't every 17 minutes minutes during 9-18 hours. For each hour periond, it's every 17 minutes starting at 1 minute but we reset back to 1 once we exhaust all values within the hour. So it's every 17 minutes within an hour but not over the range. The final period of the hour is 9 minutes (9:52 -> 10:01)
If desired then multiple cron expressions can be concatenated if seperated by the '|' vertical bar character. This allows the next valid time from a set of cron expressions to be returned. This is useful when different times are needed during weekdays and weekends. For example:
0 0 8 ? * MON-FRI | 0 0 10 ? * SAT,SUN
The next time is calculated for each of the cron expressions and the first occuring time is chosen as the next time.
When combining multiple calendars using the bar operator then some complex interactions can occur. It's recommended that you write a simple client of the user calendar that prints out the various times it would fire to make sure that the event times are what you expect.
SIMPLE Arithmetic Calendar
The default calendar is named 'SIMPLE'. When the calendar specifier string is absent or 'SIMPLE' then the interval is calculated using a simple java.util.Calendar based scheme.
The interval for the simple calendar is applied to the base java.util.Date object and consists of a set of space-delimited terms and is evaluated from left to right using the default java.util.Calendar.add() instance method for the current locale.
Each term has the form NNNNNtype, where NNNN is an integer and type indicates one of the following values: 
  • ms
    Add x milliseconds to the base date.
  • seconds
    Add x seconds to the base date.
  • minutes
    Add x minutes to the base date.
  • hours
    Add x hours to the base date.
  • days
    Add x days to the base date.
  • months
    Add x months to the base date.
  • years
    Add x years to the base date.

Examples of these sorts of intervals are (note there are no spaces between the number and the type string):
  • 10minutes
    Every 10 minutes.
  • 1hours
    Every hour. Note the term 'hours' is used even when 1 is the number. The term types are always plural
  • 20minutes 1hours
    Every hour and twenty minutes.
  • 5seconds 5minutes 1hours 2days 1months 1years
    Add each term from left-to-right to the base time.

Note that since each term is processed in order from left to right, the order of the term sequence directly affects the final date result. For example, if applying "1months 2days" to January 29, 2003, the result will be March 2nd, 2003 (Jan 29 + 1 month is Feb 28 + 2 days is March 2nd). If you instead apply "2days 1months" to January 29, 2003, the result is now February 28th, 2003 (Jan 29 + 2 days is Jan 31 + 1 month is Feb 28).
For more detail follow the link