Month: July 2011

  • Colours of ls

    The ls command list the files and directories (and other items) in a given directory. It can be asked to colour the output that it produces to give you an indication of what each file is and what permissions it has. Since I always forget what colour means what here’s a handy list of what…

  • Job Scheduling – The Timer Service

    Most non-trivial applications require at least some asynchronous processing but direct use of the thread library is not allowed in a JEE container environment. To get around this limitation EJB 2.1 introduced a timer service which, although functional, wasn’t very feature rich. This has finally been fixed in EJB 3.1 which brings a new, annotation driven,…

  • Getting Started with JEE 6 – Choices, Choices – Picking an Alternative

    In the previous article we looked at how we can use the CDI qualifier system to pick which one of multiple possible implementations should be used when an injection takes place. In this article I show you how to decide what gets injected at runtime rather than at build time.

  • Getting Started with JEE 6 – CDI Qualifiers

    In the last article we developed an application that had two alternative implementations of an EJB based QuoteService which unfortunately ran aground because CDI couldn’t choose which of our implementation to use. In this article I’ll discuss how to let the system know which implementation to use by using CDI qualifiers.

  • Getting Started with JEE 6 – Multiple Implementations of an EJB

    In the previous part of this series we developed an application that contained a simple no interface EJB which fed quotes to a QuoteBean which, in turn, supplied them to the JSF page. In this part I’ll modify the QuoteService to make it an interface and then provide two different implementations of that interface.

  • Getting Started with JEE 6 – Creating an EJB

    In the previous part we created a simple little application that comprised just a single bean and a JSF page. The page called the bean and asked for a quote which was then displayed. Under the hood though there was a lot of stuff going on and it’s best to have at least an idea…

  • Getting Started with JEE 6 – First Code

    Now that we have created the project it’s time to throw caution to the wind and just start writing some code! Right click on the example.simpleproject node under Source Packages and select new… then Java Class. Call the class QuoteBean or some such – it has been common to call classes such as this SomethingBean…

  • Getting Started with JEE 6 – Creating a New Project

    This short series of articles covers some of the basics of working with Java EE 6 (JEE6) and in particular JSF 2.0 and CDI (JSR 299 Context and Dependency Injection). JSF 2.0 and CDI bring some fantastic new functionality to the table but at the same time they also replicate a lot of existing ideas…

  • International Routing Department Scam

    There is a scam doing the rounds that tries to infect your computer or get you to phone a premium rate number for computer support. It goes something like this: You get a phone call from an Indian sounding guy called Edward / Steve / John or something equally improbably. They claim that your computer…

  • Local transaction already has 1 non-XA Resource

    While developing a bit of functionality that transferred data from one database to another in my current JEE 6 web application I came upon the exception below. Surprisingly for exceptions from deep within system this one is actually quite informative if you understand what it’s saying: the key is knowing that XA means distributed transaction. Transactions can be…

  • Creating a Connection Pool in GlassFish 3.1

    Database connection pools are by far the simplest and quickest way to get a database connection from a JEE application. This article describes how to set up a new connection pool in GlassFish 3.1. Version 3.0.x of GlassFish used configuration screens that were very similar but in a slightly different place in the menu.

  • Joomla Modules and Plugins

    Joomla has literally thousands of extensions that add various bits of functionality to a Joomla based website. This article covers those Joomla extensions that I find particularly useful or well put together. You can find these and other extensions are the Joomla Extensions site.