The DistributedMap interface is a simple interface for the dynamic cache. Using the DistributedMap interface, J2EE applications and system components can cache and share Java objects by storing a reference to the object in the cache. The default WebSphere dynamic cache instance is created if dynamic cache service is enabled in the administrative console. This default instance is bound into the global JNDI namespace using the name services/cache/distributedmap.

For using the DistributedMap in the code, check out the following snippet


InitialContext ic = new InitialContext();

//lookup the default cache map
DistributedMap map = (DistributedMap)ic.lookup("services/cache/distributedmap ");

//puts the key value pair in cache
map.put(key, value);

//get the value for the passed in key
obj = map.get(key);


Check out my earlier peice on enabling DynaCache in WAS here.

Filed in:

The dynamic cache service is enabled by default. However, you can enable or disable the service through the administrative console.

Steps for this task
1. Open the administrative console.
2. Click Servers > Application Servers in the administrative console navigation tree.
3. Click a server.
4. Click Dynamic Cache Service under Additional Properties.
5. Select Enable service at server startup in the Startup state field.
6. Click Apply or OK.
7. Restart WebSphere Application Server.

Filed in:
India, despite boasting of a huge pool of IT professionals has a very dismal record when it comes to contributing actively to the open source software movement. I am trying to dig into some of the reasons why India has a poor record and what can be done to set the record straight.

Factors
  1. Socio/Economic factors:
    Some of the reasons why an individual in India wants to be in the IT profession


    • Excellent salaries (compared to any other field)
    • Chance to go out of country and even settle there
    • Great working conditions /White collar job
    • Social pressure
      • Parents push their children because IT is the hot field
      • In some regions in India, having a male child in IT field and who has been out of country, means a windfall for the family, as the boy commands a hefty premium (read as dowry)
    • Lack of opportunities in other fields
    Love of technology/programming is not a factor to join the IT profession. I am talking about 99 % of the individuals here. Once you enter the field, you may start take a liking, but the top motivation factors are always the one I mentioned above.
  2. Industry Organization:
    IT is relatively a new young field in India and is currently expanding at a very high rate. Since most of the work done, relates to providing bodies to the clients and able to leverage the cost arbitrage. What this means is, if the company wants to achieve a 20%-30% YoY growth, it needs to keep hiring more people. This means to manage this ever-growing infantry of programmers, you need to have an equal number of Senior Engineers, Project Leads , Technical Leads, Project Managers and so on. Now, what you do, you promote people.

    This means, an above average person can easily expect a career growth where in


    • 2-3 year experience, person is a Senior Engineer
    • 3-5 Years experience you become a Project/Technical lead
    • 5-7 years of experience you become a Project Manager/Architect.
    The designations might vary from company to company, but everyone is promising a similar kind of growth. If a person doesn’t get this growth internally, you jump companies, to get this career growth.

    Compare this to US, where a person works for an average of 6-7 years to move to a Senior System Analyst/Senior Developer role. People would have spent minimum of 12-14 years in the industry before they get promoted to Project Managers/Architects.

    In India, anybody who applies for a job and says I have spent 6 years in programming and has no people/project management experience will have a tough time finding a job. Some niche technical skill people might survive, but otherwise for general Java/Microsoft/DB skills, getting a decent job becomes difficult. As a result, in India, it is very difficult to find a 10 year experience person doing hard core programming.

    Now, can an individual with 3-4 years of IT industry who starts moving into more people management role be expected to be contributing towards the open source? I don’t think so.

    Companies have started offering two career tracks to people – Technical and Management. HR will tom-tom about the same, but beyond a certain level, Technical people find lack of growth opportunities and have to eventually move to Management Track only.

    Companies like Red HAT has started scholarships to recognize and kick start the Open Source Program movement in India. Check out for details here and here.
  3. History:
    In the developed world, IT has been a 4 decade old phenomenon, where as IT has been a recent phenomenon in India. It’s only in the last 10-12 years; we are seeing the scorching pace at which the people are joining the IT industry. For any movement to come into mainstream the professional stream needs to embrace the soul of the movement and you need enough members to make a difference. Both of these factors, takes time.

    Open source usually takes time to grow and India lacks a long history.

How long it will take for India to start making contributions to Open Source?

My prediction:

I would say, give another 10 years. Why I say so?

  • By then we will have a big enough pool of people who have been in the IT industry for 15-20 years.
  • There would be enough opportunities for people to stick to the technical stream. Companies will start providing more meaningful technical roles. As companies start moving up the value chain, the demand for experienced technical people will start growing.
  • Opportunities in other fields will open up. Other professions will start paying well. Generation entering the field in next 10 years will do out of love of computers and technology. Money will not be the top most factors for this generation.
  • Salaries will hit a plateau. No promotions or job hops will lead to higher percentage of salaries increases.


Web services add a layer of abstraction, using open standards to represent and provide access to applications in a way that is functionally easy to understand and technically easy to use. However, Web services alone are insufficient for general integration projects. Current Web services standards lack specifications for management of the enterprise qualities of service (reliability, security) required. They also do not provide the general-purpose mediation and process management required to bridge the gaps between the needs of Web service consumers and the capabilities of Web service producers


This article describes a variety of techniques that you can use to quickly integrate Web applications into your portal running under WebSphere Portal.

It shows, how the external applications can be integrated into portal via Quick Fix solutions like

* iFrames (Web Page Portlet)
* Web Clipping Portlets

or for a long term, one can create a new Portlet using WebSphere Portlet Factory.


Filed in:

You have heard the buzz about Ajax and you are wondering if you can use it in your portal application. Well, you can, and this article tells you how to get started. One of the most expensive actions in a portal is refreshing pages. You can use Ajax to handle many user interaction events and then to apply the updates to portions of the page, without requiring a full page refresh. You can improve your portal's performance, create a cleaner overall portal application architecture, and, most of all, make your users happier with such a responsive portal.


Filed in:

It is also possible to log into the portal by using the following URL which includes the user ID and password:

http://server:port/wps/portal/ cxml/04_SD9ePMtCP1I800I_KydQvyHFUBADPmuQy?
userid=user ID&password=password

where you need to replace the variables for server,port, user ID, and password with the values set for your environment. For example, this method is suitable for automatic logon by a utility program for administrative purposes.


Filed in:

When working with WebSphere Portal Server, whenever the client's session gets timed out, the client gets redirected to the ErrorSessionTimeout page. The call to this page is hardcoded inside the WPS. Anthony (Joey) Bernal mentions in his blog, a hack to overcome this. He quotes


The ErrorSessionTimeout page actually gets called when security is enabled on the portal. My belief is that the location and filename are hardcoded into the portal, becuase there does not appear to be any way to change this page being called. Doing some research I came across the following snippet of code.

< script language="javascript">
< !--
-- >
< /script >

Placing the code in the ErrorSessionTimeout.jsp will redirect the user to the defined location. The jsp file is loacted at /installedApps/servername/wps.ear/wps.war/screens/html. Ok, it is not perfect, but it works!
Anyway, thinking about it further, there is another options that I completely forgot. Using HTTP Server rewrite rules and redirecting the user to the home page whenever they are directed to the Timout screen.



Filed in:

Every application has business logic. The logic might be some kind of validations or making calls in an order or doing some number crunching and spitting out the results. The business logic now can reside in multiple places. The business logic can reside from Presentation layer to business layer to the data layer ( even go down to Stored Procedures).

In my experience, what I have seen, the team's expertise decides where the business logic resides. If the team is strong in DB skills and DBA's have agreat say, the business logic ends up in database. If the GUI is very important and team does not much skills in n-tier architecture, the business logic ends up in presentation layer. If team has worked with some kind of EJB's or has object mapping experience (either Toplink or Hibernate ), the team will create a middle tier (either POJO's or EJB's) to handle the business logic.

I am not debating the merits and demerits of where the business logic should reside. What I am trying to say is, why it resides where it is resides.