Thursday, December 22, 2005
Web Services Frameworks Notes
Sunday, December 11, 2005
cloudscape and derby
Just found out that cloudscape was donated by IBM to Apache and there it
is being worked on as database project Derby. IBM continues to work on
Derby as well as release Cloudscape versions. Looks like Cloudscape has
more features that Derby. The latest Cloudscape release is 10.x and it
is written in Java. Probably a good idea to try in next J2EE project.
Monday, November 14, 2005
Notes on visitor design pattern
Monday, September 19, 2005
Sunday, August 21, 2005
Websphere Business Integration Modeler notes
Notes from reading an article on WBI Modeler
Article is at: http://www-128.ibm.com/developerworks/websphere/library/techarticles/0502_mitra1/0502_mitra1.html
High level steps for creating a business models are as below:
Creating a business modeling project.
Creating the business items.
Creating the process model (that involves identifying the individual tasks and defining their inputs and outputs).
Creating the process flow by connecting the tasks together (as sequential or parallel steps).
Notes from reading documentation on WBI 5.1.1 on infocenter
Models are organized into folders which are referred to as catalogs.
In the same project multiple data catalogs/resources/organization/report/process can be created and they can also be nested.
Both processes and tasks represent activities that are performed in a business. Processes are more complex than tasks, however, and can be represented as a sequence of activities that are linked by flows of control and data. This sequence as a whole is known as a process flow. By contrast, tasks are atomic activities that cannot be divided into smaller actions. For example, Payment Handling is a process made up of three tasks: Input Customer Information, Input Customer Order, and Obtain Product Availability
The difference between a merge and a join is that in merge as soon as an input is received it is sent as an output where as in join it waits till all the inputs are received.
A single process can have multiple start nodes.
A stop node marks the end of a process. Every process, subprocess, and loop must have at least one stop node. When a flow reaches a stop node while the process is running, the process immediately terminates, even if there are other currently executing flows within the process.
Tasks are the basic building blocks representing activities in a process model. Each task performs some function. Visually, a task represents the lowest level of work you can portray in a process.
There are two types of tasks: local (specific to the process) and global (reusable within a project). A local task is owned by a process and can only be used by elements within that process. The task exists only while the process exists. A global task is a top-level task that you create in the Project Tree within a process catalog. It can be used by multiple processes within the project.
Tuesday, July 26, 2005
Sunday, July 17, 2005
How to handle logging in portlets?
At high level below are some of the logging options.
1. Good old System.out but use this only during initial development phase. Plan on converting this to some logging framework as soon as possible. You can either do global replace all or use a free eclipse plugin, log4e, to convert to log4j statements.
2. Jakarta Log4j which seems to be the industry standard.
3. JDK 1.4 logging apis.
4. Simple Log from java.net
5. Websphere logging apis which is my preference.
There must be several more open source, vendor propritery, and in-house developed logging framework.
I will continue with this article with my experience on using log4j, system.out and websphere apis as soon as i collect my thoughts on this.
Wednesday, July 06, 2005
top 10 architecture books
- Agile Software Development with SCRUM (Paperback)by Ken Schwaber, Mike Beedle
- Software Requirements, Second Edition (Paperback) by Karl E. Wiegers
- The Mythical Man-Month: Essays on Software Engineering, 20th Anniversary Edition (Paperback) by Frederick P. Brooks
- Software Factories: Assembling Applications with Patterns, Models, Frameworks, and Tools (Paperback) by Jack Greenfield, Keith Short, Steve Cook, Stuart Kent, John Crupi
- Domain-Driven Design: Tackling Complexity in the Heart of Software by Eric Evans (Hardcover)
- Beyond Software Architecture: Creating and Sustaining Winning Solutions (Paperback) by Luke Hohmann
- Agile Software Development, Principles, Patterns, and Practices (Hardcover) by Robert C. Martin
- Software Architecture Design Patterns in Java (Hardcover) by Partha Kuchana
- Documenting Software Architectures: Views and Beyond (Hardcover) by Paul Clements, Felix Bachmann, Len Bass, David Garlan, James Ivers, Reed Little, Robert Nord, Judith Stafford
- Pattern-Oriented Software Architecture, Volume 1: A System of Patterns (Hardcover) by Frank Buschmann, Regine Meunier, Hans Rohnert, Peter Sommerlad, Michael Stal, Peter Sommerlad, Michael Stal
- Design Patterns by Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
- Refactoring: Improving the Design of Existing Code by Martin Fowler, Kent Beck, John Brant, William Opdyke, Don Roberts
- Patterns of Enterprise Application Architecture by Martin Fowler
Saturday, May 28, 2005
jsse tips
keytool -import -alias myalias -file certfile -keypass passwd -keystore storename -storepass passwd
2. To start a java client with debug info is:
java -Djavax.net.debug=ssl -Djavax.net.ssl.KeyStore=storename -Djavax.net.ssl.trustStore=storename javaclient
3. Use the below java code that works with point #2 above.
SSLSocketFactory factory = (SSLSocketFactory)SSLSocketFactory.getDefault();
SSLSocket socket = (SSLSocket) factory.createSocket("localhost", 443).
rest of the code is standard to get output stream and use buffered reader.
4. an alternate approach is at javaworld article
Sunday, May 15, 2005
IBM portlet programming interview questions
Portlet is basically an extension of servlet but with some fundamental differences like a web page can consist of mulitple portlets but can have only single servlet, portlets cannot do browser redirect but servlet can.
What are the similarities between a servlet and a portlet?
Portlet is a an extension of servlet, can write html output, can forward but within the same portlet context, access to HTTP objects like session, request, response, along with similar Portlet objects like session, request, response.
What is WSRP?
Web Services Remote Portlet.
What are the different approaches for logging in portlet?
Websphere log apis, log4j, custom logging, jdk1.4 log apis and any logging framework should work just as well.
What are the different approaches for managing environment specific configuration?
Properties file, portlet attributes (configured via the config-param in portlet.xml).
Difference between abstract portlet and concrete portlet?
Explain struts portlet. How to create one?
Create a struts standalone web app and convert to portlet. There are 8-10 steps to do so.
Explain JSR168 portlet. How to create one?
Use WSAD wizard.
What is the difference between HTTPRequest and PortletRequest?
HTTPRequest is for the entire portal page and portlet request is abstracted out of HTTPRequest and is unique per portlet. As best practises portlet code should use PortletRequest object.
Should you use class scoped variables in portlet?
No, single instance of portlet in the JVM and so can cause data corruption if variable values are changed. However, no harm in using "final static" singleton kind of variables.
Can you do browser redirects from the portlet?
No, only forward.
What does the tag <portletApi:init /> do?
Initializes portletRequest, portletResponse, etc on the page.
What are the different portlet states?
Maximize, Normak, Minimize.
What are the different portlet modes?
View, Edit, Configure, Help.
Portlets execute in two steps, what are those?
Action and render in portal 5.0. There is a new phase IStrutsPrepareRendor introduced in portal 5.1 to address browser refresh, back, etc issue.
How to access external systems from portlet code like database, credential vault, and ftp server?
What is portal service?
patterns
But it looks like that sometimes there could be anamolies in the patterns. The patterns may not be perfect, there may be disadvantages, or they may not be just right. In the software world there is something called anti-patterns. Sometimes in nature we see malformed plants and animals which does not seem to conform to intended behavior of pattern.