Is There a Prize with That?

I just started answering questions on LinkedIn lately, and got a Best Answer yesterday on a question about Doubt in handling Exceptions in Java*. Before the Internet, everyone had 15 minutes of fame. Now it is more like 15 nanoseconds 🙂

*Requires LinkedIn account to view

If you found this interesting, please share.

© Scott S. Nelson

WLP Sessions and Porlets in Shared Libraries

Awhile back, I ran into an issue where session data was being lost between requests in a WebLogic Portal project. As it only occurred in a clustered environment, it was obvious that the value was not being persisted, even though persistence was set properly with

<wls:session-descriptor>
<wls:persistent-store-type>replicated_if_clustered</wls:persistent-store-type>
</wls:session-descriptor>

After much frustration, someone on the team ran across an additional setting for the session-descriptor node: sharing-enabled. In the case where a portlet is from a shared library, the persistence does not work unless sharing-enabled is set to true.

<wls:session-descriptor>
<wls:persistent-store-type>replicated_if_clustered</wls:persistent-store-type>
<wls:sharing-enabled>true</wls:sharing-enabled>
</wls:session-descriptor>

In hindsight, this behavior makes some sense, in that most portlets that are distributed as shared libraries by vendors do not require session values. However, in the case where a shared library is created by an application team to reuse portlets across portals where WSRP is not practical, the need to share sessions may arise, and now you know how to fix it.

For other deployment descriptor options, see http://download.oracle.com/docs/cd/E12840_01/wls/docs103/webapp/weblogic_xml.html

If you found this interesting, please share.

© Scott S. Nelson

Good Thread on White Space in JSPs

While it is tempting to quickly skim an blog entry for the information I’m seeking at the time, a recent find on dealing with white space with JSPs reminded me that there is a darn good reason most blogs have a comment feature.

The thread I’m talking about is Trim Spaces in Your JSP at Raible Designs. Fortunately, my paranoia paid off, and I did not try this setting blindly on the project where I was looking for such an answer (and have since rolled off). I almost did, but decided not to because I knew I would not be around to support the change, and that whoever I told about it may forget it. As it is a performance enhancement and the application had some peformance issues (too many cooks in the presentation layer kitchen IMHO), it was not as easy of a call as it may seem.

The con that comes up in the comments on that post is that it wipes all white space between tags. If I were the only person developing on the project, or if was a small team where I knew for certain that only experience JSP developers were working on the JSPs, I’d still feel safe. This is because if a space has to be in a page between two dynamic parameters, the experienced JSP developer will use an entity code rather than just a blank space.

There is also a comment in the thread about how to cut down white space in a build file. That was actually the type of solution I was seeking at the time (and missed at the time).  I would have to experiment with the solution before I suggested it, but it looks like what I wanted.

If you found this interesting, please share.

© Scott S. Nelson

My New 1000 GB (1TB) Drive

I’ve been wanting a 1 TB drive since Seagate started selling them at a reasonable price. Besides being budget conscious in the current economy, I also got paranoid with all the reports of problems. I trusted Seagate to fix them eventually, but it still left me with some hesitation. I finally got to the point where every time I looked at my main and back up drive free space, I was getting concerned (I like to have 50% free).  Then New Egg had a sale. I hemmed and hawed for a couple of days and finally bought the Western Digital Caviar Green WD10EADS 1TB. It is cheaper than the Caviar Black, though not by much. Reading the reviews, the price difference has to do with speed. I also read the reviews of unhappy customers to see what the complaints were, and the only problem with the Green was speed. The other drives had issues with noise, or failing within a short period of time. I’m in agreement with most reviewers, in that a drive that big is only for storage, so speed is not as important. Good thing, too, because the drive is not fast. It is quite, though, which is appreciated in my home office where there are two towers and one laptop running all the time with a combined 6 to 7 drives running (depending on if the portable is plugged into the laptop) and 14 fans running. I look forward to summer just so my window A/C will drown out the noise.

Installation was a breeze, which is good because the OEM one comes with no instructions.  No I just have to stay patient and test the drive for a couple of weeks before I wipe the 500 GB Seagate it is replacing and move it up to my main drive.

If you found this interesting, please share.

© Scott S. Nelson

A Tutorial by Any Other Name…

It may be just because they are really good at SEO, but everytime I’m looking for a quick (free) tutorial on something I want to learn about or need a refresher, RoseIndia usually comes up. I think the reason for the quality of most of their tutorials is that they don’t create them all themselves. This is not immediatly obvious, unless you keep looking at other search results for tutorials and find the same one posted in 20 other places. Still, they are good aggregtor for technical tutorials, and for that I definitly recommend bookmarking them.

If you found this interesting, please share.

© Scott S. Nelson