LDAP Explorer 0.2 released


Written on February 17, 2010 by Allan Lykke Christensen

LDAP Explorer 0.2

Over a nice glass of red wine I finished the second release of LDAP Explorer for NetBeans. New in this version:

  • Support for NetBeans 6.7
  • Possible to create LDAP connection profiles in the Services window
  • Cleaner browser window with the option to see attributes in table- or LDIF view.

You can download the new release from the Google Code Project Page or on the NetBeans Plugin Portal.

If you find any bugs or would like to see your favourite features in the module, please go ahead add it to the project page or as comments to this post.


NetBeans LDAP Explorer update


Written on February 16, 2010 by Allan Lykke Christensen

LDAP Explorer - Now with server registry
Isn’t it just typical. You want to spend a few hours implementing a few features in your application and before you know it its 1 in the morning. Following my basic implementation of an LDAP Explorer in NetBeans, I wrote down a list of features I want to implement. Among the features were a registry of LDAP servers (so one doesn’t have to keep entering the connection details). So, if you look in the source repository you’ll find that I’ve implemented a registry of LDAP servers (accessible through the Services window). Activating the nodes will create a new window and connection to the directory service. With that in place, I’ve also removed the “LDAP Explorer” from the Window menu. Lastly I’ve also changed the NetBeans API dependency so that it is now compatible with NetBeans 6.7.

Next, I want to clean up the Explorer window (no need to display the connection details there anymore), followed by implementing an interface for conducting custom queries and executing LDIF commands.

If you got some feature requests or comments you are welcome to submit them at the Google Code project site or on the NetBeans Plugin Portal. Thanks.

LDAP Explorer Module for NetBeans


Written on February 14, 2010 by Allan Lykke Christensen

First look at the LDAP ExplorerThis is a short post (as I’m wasted and want to get some sleep). Recently I’ve been working with a lot of LDAP service and though it would be a nice addition to NetBeans if I could make simple lookups and browse LDAP directory services directly from NetBeans. Therefore I created a small module today (LDAP Explorer) which I’ll hopefully be able to maintain. The project is hosted at Google Code (Sun/Oracle is so confused about the future of Kenai.com and Java.net that I decided to scrap it for now – also, Kenai with Jira is just bloody slow). The project can be found at http://code.google.com/p/nb-ldap-explorer/. With the code currently in the repository you can make anonymous connections to an LDAP service and browse the nodes available under the Base DN. If you are interested in co-maintaining this module, please let me know. That is all for now.

Review: RESTful Java Web Services by Jose Sandoval


Written on January 15, 2010 by Allan Lykke Christensen

RESTful Java Web ServicesI’ve been wanting to learn more about RESTful web services for a long time. I was introduced to the topic a long time ago but never really got time to look into the details of implementing neither clients nor services. For ages I’ve been trying to read articles and blogs about RESTful services but none of them really enticed me. So during my Christmas holiday I read RESTful Java Web Services by Jose Sandoval. The book is very concise and straight to the point in regards to familiarising the reader with RESTful service APIs. I was very pleased with the book as it got me started quickly and gained understanding of both the concepts of REST aswell as Java options for building RESTful services. There were a few things missing from the book however:

a) No examination of RESTful client APIs such as the Jersey Client API. The author may not have felt that it was necessary since RESTful clients can be implemented using a plain Java HttpURLConnection or the Commons HTTP Clients API (Used in the book).

b) Security aspects are only mentioned in the passing. It would have been very helpful to the reader if there were a few actual examples of protecting a RESTful service using security realms and SSL, followed by examples on how to access protected services.

c) Lastly integration with EJBs is not discussed. It is simply mentioned that they can be integrated. I was shocked to find that in the reference implementation of Java Enterprise 6 there is no dependency injection of EJBs into a restful service using the @EJB annotation. Instead one would have to manually connect to the EJB using JNDI, or implement the RESTful service as an EJB (this problem is not the authors fault!! but it would have saved me a few hours if this short coming was explained in the book).

Overall I’m very pleased with the book, it is great and easy to read. It has given me (a RESTful noob) confidence in using and implementing RESTful services in a production setup.

3.5 of 5 stars!

In my next post I will try to uncover some of the shortcomings of the books with examples for JavaEE 6 (GlassFish).

Current project at work


Written on December 7, 2009 by Allan Lykke Christensen

Kähler LogoBlogging is like a drug – once you get started it is hard to stop. Before going to bed, I just wanted to drop a link to a site that I’ve been working on for the past month. It’s for the world famous ceramics company Kähler Design. The site with built with Joomla and VirtueMart. I had to seriously customise and modify the VirtueMart component code to make it work the way I wanted, but I’m quite happy with the outcome. Still working on the site (British version coming next week). Anyway, the website is http://www.kahlerdesign.com. Let me know what you think.

Review: JBoss RichFaces 3.3 by Demetrio Filocamo


Written on December 7, 2009 by Allan Lykke Christensen

On man – I’ve been lost in the blogosphere for that past four months. Back in August we bought our first house and let me tell you, it is no joke! The house needed a lot of work. A lot more work than I anticipated. It is just a week ago since the bathrooms were completed. For the past few months we have had a port-a-potty outside the house. It feels luxurious not having to get out in the cold early in the morning to shower. Anyway, since August all my time has gone into painting, cleaning, gardening, demolishing (loved that!), decorating, and spending countless amounts of cash of all sorts of stuff you’ll never need when living in a rented apartment. Most of the house things are coming together now, which means that I’ll once again have some spare time to blog about my passion for computer programming.

As a “glad to be back” gesture here is a reviewed of Packt Publishing’s JBoss RichFaces 3.3 by Demetrio Filocamo, which I was involved in (as a reviewer) earlier this year.

JBoss RichFaces 3.3

I’ve always loved JavaServer Faces. I believe it is the closest you get to writing real object-oriented web-based solutions. Don’t get me wrong, I use and like many web frameworks, but JSF has to be my favourite. However, one of the big problems with JSF is that it is pretty basic out-of-the-box. This is completely intended as JSF is supposed to solve the low-level issues in developing web-based solutions, and leave the sophisticated user interface components to component developers, much like Swing. What makes JSF really powerful are component libraries like JBoss RichFaces, ICEFaces, and PrimeFaces. There has been a ton of books focusing on the core of JavaServer Faces (my personal favourite is JSF in Action by Kito Mann) but they all seem to stop when it is getting interesting; using component libraries to enhance your applications. It was therefore a pleasure to read and review this book about RichFaces 3.3.

The book is a good 273 pages well-suited for JSF beginners and experts alike. The book assumes that you are already familiar with JSF, so if you don’t already grasp the topics of managed beans, page navigation, validators and converters, you might want to start somewhere else. It starts out explaining how RichFaces fits in the JSF world and how to set up your own environment for developing RichFaces applications. Once you’ve gotten started Demetrio takes the reader through a “Contact manager” case study, spanning eight chapters, touching on all the essential areas of RichFaces. One of the great things about this book is that Demetrio carefully explains each step and technique used so that the reader doesn’t get confused or left wondering. All too often you read books where you have to consult Google before getting it, but this is not one of those books. My two favourite chapters are Chapter 9 and 11, which explains how to create a new skin for your RichFaces applications and how to develop custom components respectively. Both these areas are overlooked by many developers who end up writing twice as much code to style their components or provide frequently used composite components. In my opinion the only drawback is that many of the code examples is based on JBoss Seam rather than plain JSF.

I can strongly recommend this book to any JSF developer who wants to take their application to the next level with RichFaces. Four and a half stars out of five!

Doxia APT rendered view now working


Written on August 18, 2009 by Allan Lykke Christensen

Thanks to Milos Kleint, I’ve got the APT rendered view working for the APT Editor. Hopefully this mean that I’ll be able to release version 1 of the module in the very near future. Still need to improve a bit on the JavaCC grammar, provide an APT code palette, and clean up the code. Anyway, here is a small video demonstrating the rendered view:

Doxia APT support coming closer


Written on August 16, 2009 by Allan Lykke Christensen

This and last weekend I’ve been working on improving the Doxia APT support in NetBeans. Namely I’ve been trying to integrate the Doxia APT parser with the NetBeans Lexer classes and secondly I’ve been implementing multi view support in the editor.

Doxia APT Parser integration

Last weekend a spend several hours trying to get my head around the Doxia Apt Parser and how it could be integrated with the NetBeans Lexer classes. Unfortunately I never found a way to do the integration. The NetBeans Lexer require that you implement the org.netbeans.spi.lexer.Lexer interface including a method, nextToken(), where each token is extracted as the file is being read. The Doxia AptParser on the other hand provide a simple parse method completing the parsing in one step. The two paradigms of parsing doesn’t seem to be compatible. If anyone got an idea on how to integrate the two I’d love to hear from you.

Multi View

The purpose of the multi view is to let Apt writers switch between the source code of an APT file and its rendered representation. So far I’ve managed to set up the NetBeans plumbing for displaying the two views and their components.

APT Multi View

APT Multi View

Unfortunately I’ve run into a Classloader problem when using the Doxia Converter classes for turning APT files into XHTML files.  Outside NetBeans the converter is working perfectly, but when I use it with the multi view inside NetBeans I get the following exception:

WARNING [org.netbeans.ProxyClassLoader]: Will not load class org.codehaus.plexus.container.initialization.InitializeResourcesPhase arbitrarily from one of ModuleCL@57a41eae[dk.i2m.netbeans.langsupport.apt] and ModuleCL@4ba805a3[org.netbeans.modules.maven.embedder] starting from SystemClassLoader[511 modules]; see http://wiki.netbeans.org/DevFaqModuleCCE

SEVERE [org.openide.util.Exceptions]

java.lang.ClassNotFoundException: org.codehaus.plexus.container.initialization.InitializeResourcesPhase

WARNING [org.netbeans.ProxyClassLoader]: Will not load class org.codehaus.plexus.container.initialization.InitializeResourcesPhase arbitrarily from one of ModuleCL@57a41eae[dk.i2m.netbeans.langsupport.apt] and ModuleCL@4ba805a3[org.netbeans.modules.maven.embedder] starting from SystemClassLoader[511 modules]; see http://wiki.netbeans.org/DevFaqModuleCCE

SEVERE [org.openide.util.Exceptions]
java.lang.ClassNotFoundException: org.codehaus.plexus.container.initialization.InitializeResourcesPhase

I am still to look into what can be done about the classloader problem. I’ve checked the suggested link (http://wiki.netbeans.org/DevFaqModuleCCE), but it seems to only explain the problem, without providing a solution or workaround.

That’s all for now!

Doxia APT language support


Written on August 5, 2009 by Allan Lykke Christensen

As I use Maven for most of my projects I end up writing a fair amount of documentation using the APT format [1]. Unfortunately NetBeans doesn’t have any built-in support (syntax highlighting, parsing) for the language yet. So yesterday I decided to looking into providing file type and language support for NetBeans. I first stumbled across a lot of tutorials regarding the Generic Language Support. However, after some researched I found that it is no longer supported. Instead I found another more recent article on the NetBeans wiki about providing language support [2]. The article was quite sketchy and confused me a lot. The confusion was mainly because of too much focus on adapting a JavaCC grammar file for Java syntax highlighting. I hope for the final version of the article will have a simpler example. Nevertheless, the article got me on my way and I’ve now managed to create very basic syntax highlighting for the APT language.

APT Language Support in NetBeans

APT Language Support in NetBeans

There is still a long way to go. I need to implement the parser and improve on the JavaCC grammar. Also, I’m planning to provide a “Preview” view in the editor so that the writer can get an idea of how the rendered document will look as he or she is writing.

If anyone knows of a good book or website about JavaCC, I’d very much like to hear from you.

That’s all for now!

[1] http://maven.apache.org/doxia/format.html
[2] http://wiki.netbeans.org/How_to_create_support_for_a_new_language

Third run. Week summary


Written on August 2, 2009 by Allan Lykke Christensen

I’ve just had my third and last run of the week. This morning my leg pains had almost gone completely. I believe that it went as a result of a stretching exercise recommended by one of my colleagues. I’ve been doing the stretching exercise before and after each run as well as every morning and evening. Nevertheless, my body was fatigued today and my run wasn’t very impressive. I went from 37 to 38.5 mins. It was a bit demotivating, but what keeps me going is the wonderful feeling that I get when I arrive home from a run. I can feel my body thanking me for the exercise and I feel warm and fuzzy inside.

This week in summary:

  • I’ve ran 15 KM (3×5 KM)
  • I’ve cycled 7 KM (1×7 KM)

My routine for next week:

  • Cycle 42 KM (6×7 KM)
  • Run 15 KM (3×5 KM, where one of the runs is an actual practice run)

I guess now is the time for me to also get into a healthier diet. Oh dear, what will become of me…