How to automatically recover Tomcat from crashes

A script which automatically detects that tomcat has crashed and restarts it.

Getting started with Nexus Maven Repo Manager

This tutorial outlines steps required to install Nexus (Maven Repository Manager) under Tomcat, or another webapp container. It shows you practical configuration and includes code snippets that go in your pom.xml and settings.xml in order to read and publish artifacts to Nexus server.

2 ways to convert Java Map to String

This article shows 2 ways to convert Java Map to String. Approach 1: simple, lightweight – produces query string like output, but restrictive. Approach 2: uses Java XML bean serialization, more robust but produces overly verbose output. Approach 1: Map to query string format Approach 1 converts a map to a query-string like output. Here’s [...]

How to configure multiple page.xml files in Seam 2.2

Seam lets you specify navigation rules in the pages.xml file which can become very large for apps with many pages and transitions. Seam allows you to break this file into multiple small files. This allows you to easily manage large applications by creating multiple pages.xml files, typically one per page. This article describes how to create multiple pages.xml files in Seam 2.2.

Spring classpath scan breaks when migrating from JBoss4 to JBoss5

Spring 2.5 classpath scan does not work on JBoss5 due to internal architecture changes in JBoss5. You may face this issue when migrating from JBoss4 to JBoss5. This article walks you through a simple fix, with code snippets.

EJB3 JPA error when migrating from JBoss version 4 to 5

When I tried migrating my JBoss 4.2 application which uses Spring to manage transactions, to JBoss 5.1, I got the following error message.

Specification violation [EJB3 JPA 6.2.1.2] – You have not defined a jta-data-source for a JTA enabled persistence context

This is a known issue and there are two known workarounds for this problem. See article for details.

How to rotate Tomcat catalina.out

If catalina.out becomes 2GB in size, tomcat crashes and fails to start without any error message. To avoid this scenario you should rotate the catalina.out frequently. This article describes how to setup auto rotation of catalina.out on a linux/unix machine.

Cache Java webapps with Squid Reverse Proxy

This article shows you step by step how to cache your entire tomcat web application using Squid reverse Proxy without writing any java code. Cache your entire website as static HTML files stored in memory or disk. This technique is useful to when dynamically generated pages in Java are time and CPU intensive. Ideal scenario is when there are high number of reads and few writes. Caution: do not use this approach to cache secure pages. Read article for full details.

3 ways to serialize Java Enums

This article shows you best practice for serializing Java enums to a file or database (via Hibernate, JPA). It discusses three ways to serialize enums with code examples, the pros and cons of each way and also recommends the best way. You should know this if you are serializing an Object with an enum field to a file or mapping a POJO to a database table using technologies like Hibernate or JPA.

Code Generation for Web Applications with Clickframes

Clickframes is a Code Generation framework written in Java designed specifically to generate (Java) web applications. Clickframes lets you jump start your new project with working generated code at minute zero. Keep what you’ve learnt in one project and reuse in another project using Clickframes Code Generation templates, or simply use the templates that come with Clickframes. The key to the Clickframes approach is separating what an application does and how it does it. What an application does is specific to the project, but how it does it can be generalized and reused across multiple project using code generation.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes