Computing @ 40's

Trying to overcome the obsolescence


Leave a comment

Java float and double primitive types are evil. Don’t use them.

Hi people!

I’m right back here again from holidays and after some weeks without publishing anything I want to resume the work with a short post talking about java primitive types float and double.  Today is an easy post for begginers. No web, no application servers, no JavaServer Faces. A simple lesson about Java SE.

Today I was talking with a colleague at work. He was showing me a Java class, and I noticed that he was using a Double class variable to store some floating point values that were coming from a database. A long time ago I had a bad experience with float and double types when doing a database migration that gave me some hours of headache. I pointed him that he should use BigDecimal instead of that evil things. Fortunately he followed my advice.

I will explain here why I hate float and double primitive types in Java. Why I think they shouldn’t exist. Follow this link and you will learn the reason of my obsession against these “poor innocent” types.

As always I will be very proud to have any comment, any word encouragement, any gift, any million of euros. Every kind of feedback will be greatefully wellcomed.

Cardedeu, September 30th, 2013


Leave a comment

How to create a custom realm in Glassfish 3.1.2.2

Today I am proud to announce another new entry in this blog. This article is called How to create a custom realm in Glassfish 3.1.2.2. This article is a tutorial where I show how to add security into a Java Web application and doing that creating a custom realm in Glassfish. In this case the audience of this article is people with some grade of experience in Java EE programming, but I tried to explain the things as easy as I can, as always.

There are several reasons that makes me to feel satisfied with it:

  • This new post is the most ambitious one I have published here. It represents the end of a series of articles that I began in order to show how to create a Java application starting from zero. These posts are Oracle Glassfish Server Tools at Eclipse Juno, How to create a Glassfish server available at Eclipse, Creating a simple JSF Web application from the ground and How to setup a JDBC connection in Glassfish. It has been a long path until arriving here but finally the work is done.
  • This days I am celebrating that one year ago I opened this blog and began this little history. As I said in my presentation, this blog is still a try. I don’t consider it still a success. But by now I am doing the way along and I’m still here writing.
  • Also the last weeks I arrived to the 5.000 visits. Really this is much more than I expected one year ago. This makes me to be strong enough to continue. As always I want to give my thanks to Google to put me on the search lists, and also some links from blogs and forums that have given me some visitors. Thanks to all to click here, but I will much more satisfied if you tell me if what I am writing is being useful or not.

Nothing else to say. Enjoy the article (if you understand it).

Cardedeu, July, 8th, 2013.


Leave a comment >

This June of 2013 is being a pretty good time for people interested in Java and Java EE.

Almost at the same time three of the most important technologies I am using nowadays are releasing new major versions:

  • Oracle released Glassfish 4 on June 12th: you can find a short article with the new features in infoq.com
  • Eclipse is going to launch Eclipse Kepler on June 26th, as always very punctual on their releases. Really i wish that Kepler will make us forget all the troubles that came with Juno release.
  • People developing JBoss are launching the Alpha version of Richfaces 5. With this version I expect that this framework will become mature and will begin to explode the components available in it.

So, three of the pillars of my current work are now publishing important new versions. I expect to include them in our company projects in the next months.


Leave a comment

How to setup a JDBC connection in Glassfish

Today I publish a short article talking about how to set up a JDBC connection in Glassfish. Again, an entry for beginners, but I expect it will be useful for somebody.

As always I will thank any comment you want to do here!

 


1 Comment

Creating a simple JSF Web application from the ground

Today I publish an article explaining how to create a JSF application starting from zero with Eclipse and Glassfish 3.1.2.2. My aim is to show the process step by step, without using advanced tools, like Maven or project templates coming from JBoss Tools Eclipse plug-in. The reason to do this, is to make people understand how easy can be to create a simple Web application without a lot of knowledge using Java.

The project created here can be the base to create more advanced projects.

This blog has arrived this week to the 4.000 visits, starting from July of 2012. I expect that somebody has been helped by some of the articles here.

Greetings!


Leave a comment

Installing Glassfish 3.1.2.2 and upgrading EclipseLink 2.4.0

Here you have a new entry with the steps to install Glassfish 3.1.2.2 and upgrading version of EclipseLink coming with Glassfish (2.3.3) with the newest version, in this case EclipseLink 2.4.0.

Follow the link to read it.

I wish it can help you!


Leave a comment

Ready, steady, go!

I officially start today this blog, although I have published already some contents about me, the purpose of this blog, and the development environment used in this blog.

This first post is a little introduction about Java development and Java EE Application Servers. Click here to start reading it.