Blog moved to www.yellowbluebus.com/blog
Week ago I wrote about unusual way of handling exceptions in Filenet Workplace.
try
{
invokeNamedEvent(eventName, uiModule, request, new WcmEventResponse(response, this, okToRedirect));
// If a non-null return value was returned from the invoke, check for true/false. If the
// result matches "false", set the redirect flag to true indicating to cancel processing
// of the page.
Object result = request.getAttribute(INVOKE_RETURN_VALUE);
if ( result != null result.toString().equals(String.valueOf(false)) )
sendRedirectCalled = true;
}
catch (Exception e)
{
throw e;
}
I was thinking about Web 2.0 and found some similarities between them and dotcoms:
| dotcoms | Web 2.0 |
| Generated a lot of ideas revolving around web enabling of normall stuff | Generate a lot of ideas revolving around web enabling of normall stuff |
| Generated some ideas and generated a lot of copies of the same ideas | Generate some ideas and generated a lot of copies of the same ideas |
| Nobody thought of generating revenue from ideas | Nobody thinks about revenue |
| Most of the sites were maid to be sold to venture capitalits | Most of the sites are maid to be sold to survived dotcoms |
Techcrunch announced the service from 3Bubbles, which allows to place the chat into the blogs. Blogosphere reacted with enthusiasm at first sight, like it happens with everything posted in Techcrunch.
This one looks like very promising solution when I will need to convert normal Java beans to Filenet's property bags.
private Exception configureWindowIdException = null;
What about good old try-catch?
public void configurePage(ServletContext applicationValue, HttpServletRequest request, long windowIdMode)
throws Exception
{
... skipped ...
configureWindowId(request);
// If configureWindowId constructed an exception, throw it.
if ( configureWindowIdException != null )
{
if ( !sp.isSignedIn() )
{
// We attempted to propogate a window Id when not signed in
// probably the result of signing out of an info page.
// Don't throw. Fix the windowId to mainWindow instead.
//
WindowID assignedId = new WindowID(null);
WindowID currentId = new WindowID(null);
assignWindowId(assignedId, currentId, false);
configureWindowState();
postProcessWindowId(assignedId, currentId, currentId,
false, false, false, false, false);
}
else
throw configureWindowIdException;
}
... skipped ...
}
While discovering internals of Filenet Workplace I decided to create a class diagram.

/**
* Validates HostName
*
* @param hostName The host nema to validate
* @return true, if valid.
*/
public static boolean validateHostName( String hostName )
{
return !hostName.equalsIgnoreCase("localhost") !validateIP(hostName);
}
/**
* Validates a String as a valid IP address. Checks for four parts, and that
* each part represents a numeric value between 0 and 255.
*
* @param ipAddress
* @return
*/
public static boolean validateIP( String ipAddress )
{
boolean isValid = false;
StringTokenizer st = new StringTokenizer(ipAddress, ".");
if ( st.countTokens() == 4 )
{
isValid = true;
while ( isValid st.hasMoreTokens() )
isValid = validateUnsignedByte(st.nextToken());
}
return isValid;
}
127.0.0.1
Everybody, who worked with Rational tools could think that there is nothing rational in them. And frustration mounts when you'll try to read the supplied documentation. The documentation is structured, but some pages are very shallow and others do not explain topics in undestandable language.
This is a little step by step guide on how to create and register custom service with JMX interface on WebSphere:
public void initialize(Properties configProperties) throws Exception {
readConfig(configProperties.getProperty(externalConfigURLKey));
}
public String getType() {
return "MyMBean";
}
public Properties getMBeanProperties() {
Properties props = new Properties();
props.put("SpecialProperty", "value");
return props;
}
public String getUserName() {
return this.userName;
}
public void setUserName(String param) {
this.userName = param;
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MBean SYSTEM "MBeanDescriptor.dtd">
<MBean type="MyMBean">
<attribute name="UserName" type="java.lang.String" getMethod="getUserName" setMethod="setUserName" />
</MBean>
That one I like! It gives people real freedom and flexibility. Price is right too. I think I'll download 30 day evaluation when time permits.
Good and very thorough article about CMP Beans optimizations.
Make sure your finder methods use indexes
Listened to a Webinar at Jboss.org about EJB3. What a nice piece of technology! Basically everything will be defined in attributes: @Session is for session beans, @Entity is for entity beans. It's like having metadata injected into actual classes - nice, very nice idea!
ASP.NET Development Center Home: ASP.NET 2.0 Internals - ASP.Net getting more useful. New quirks announced.
After third example based on non-functioning code I dropped reading "Software Architecture in Practice". I can provide more practice that authors of that book provided. There is no point continue reading that book if I have other software architecture books to read.
Well, one more day reading book, I think I have to go straight to third "real life" architecture sample because second one was about another unreleased project. Now it's about Air Traffic Control project, which was funded by FAA, but never was implemented "because of budgeting issues". In real world that means "project was well over budget even before implementation started". Which, in turn, speaks against architecture, because architecture supposed to help projects to be on budget...