JavaOne and Oracle Develop 2010
July 15, 2010 by Frank Salinas · Leave a Comment
Tomorrow is the last day for early-bird registration discounts.
JavaOne and Oracle Develop 2010
Best Practices: Avoid Returning Null
June 9, 2010 by Frank Salinas · 4 Comments
I recall the first oddity that struck me about Java programming is that it seems common practice to test returned objects for null. I find it frustrating and inefficient to scatter if conditions throughout my code just to see if I have a valid object instance returned. Read more
Java Web Services: Getting Started
March 9, 2010 by Frank Salinas · Leave a Comment
When it came time for me to tackle my first web service implementation I ran into a lot of problems. Here I will write a series of articles to address the questions and problems I encountered in hopes of helping you get started in developing web services faster than I did. The following example will show you how to create a web service using JAX-WS and packaged as a servlet. Read more
Java tip: How to read files quickly | Nadeau Software
November 25, 2009 by Frank Salinas · Leave a Comment
Here’s a good article comparing the performance of various File I/O implementations. I was particularly interested in the performance difference between the BufferedInputStream and the FileChannel.
Use final
October 27, 2009 by Frank Salinas · 2 Comments
The final keyword is one that I find is under utilized. Use final in your projects as a means of defensive programming. If you are unfamiliar with this keyword here is a great article on its usage.
The EJB Specification, Concurrency, and Batch Processing
March 1, 2009 by Frank Salinas · 1 Comment
The EJB specification does not leave much room for implementing concurrent processing within the EJB container. This poses a problem to developers who need to implement solutions for processing long running batch processes as part of the business logic of an application. The EJB specification states the following:
The enterprise bean must not attempt to manage threads. The enterprise bean must not attempt to start, stop, suspend, or resume a thread, or to change a thread’s priority or name. The enterprise bean must not attempt to manage thread groups.
These functions are reserved for the EJB container. Allowing the enterprise bean to manage threads would decrease the container’s ability to properly manage the runtime environment.
Enforce Data Integrity With Check Constraints
November 23, 2008 by Frank Salinas · Leave a Comment
I came across some code the other day that simply horrified me. I was looking at a table that had a field name which implied it stored a boolean value (e.g. IS_LAUGHABLE). The field type is defined as a char(1), allows NULL values and defined no default value. Looking at the data in the column I found a combination of the following values: T, F, Y, and N. Read more
Java vs. .NET: Job Market and Salary Survey
November 22, 2008 by Frank Salinas · 3 Comments
I was recently contacted about a technology job search engine named OdinJobs.com. I took a look a the site and found that they have some great tools for job market analysis and salary surveys. Here I compared salaries and job market trends between J2EE and .NET Architect/Lead and Developer roles in the San Francisco Bay Area.
Read more
Web Services on JBoss
October 29, 2008 by Frank Salinas · 7 Comments
I’ve been working on a project which requires developing some web service endpoints. This is the first time I’ve had to develop Java web services and I came across a couple of issues which slowed me down. I am using JBoss 4.0.5.GA which comes packaged with JBossWS 1.0.3.SP1. I started out by going through the examples provided in Chapter 12 of the J2EE Users Guide which helped me get a template for my project. As I attempted to expand my project with multiple service endpoints I received errors during deployment using JBossWS 1.0.3.SP1. I decided to upgrade to JBossWS 1.2.1.GA which is packaged in the 4.2.3.GA certified distribution of JBoss Application Server. The upgrade solved some of my initial issues but introduced a couple more, some of which are not documented in the official JBossWS users guide. Read more