Posts

Artifactory and Docker

A quick reminder to myself (and anyone else who may miss this) about setting up a Docker repository in JFrog's Artifactory online service.  As of now, this page , has a "Click to expand" link under the "Working with Artifactory Online" section. The text there explains that there's a special pattern to be followed for naming the repository.  It's this information that I was missing in order to get a repository up and available for use. Here is an excerpt from those instructions: First, you need to create a new Docker V2 repository by the name  dockerv2-{local/remote/virtual}.  HTH, Carl

Opening OpenShift

Docker has occupied a good bit of my free time in recent months.  In addition to Docker and related technology, all things cloud seem to have really exploded in a great way. On all things cloud, I highly recommend The Cloudcast  podcast.  In case you are not aware, this is well produced, first-class production about cloud computing.  So far it seems to be a very well balanced technology mix and it has also reminded me of how competitors in the technology space can learn from and respect one another...when they try. Lately, OpenShift has, once again, been very much a part of my daily efforts.  Certainly I have used and been impressed with the prior release, but V3 and the move to Docker and Kubernetes under the hood was, in my opinion, an excellent move.  I am working with others on a couple of different OpenShift Enterprise (OSE)  installations but the hacker in me learns better when I play with the latest open source bits, as time permits. If y...

Docking some

Under the new technologies (at least new to me), comes Docker .  I have been playing with Docker on and off for a good bit now.  I don't think I really got it until JavaOne last October. I have created a couple of cool use cases since then that I think ultimately will really help our organization. My most recent find is the Informix image created by IBM which can be found here .  Now that I have a few containers up and running with some real data, I am trying to learn more about best practices for such use cases. Certainly getting the container running, importing a database, and running it is not difficult but specifically what the automation of all of the above looks like in production is not quite clear to me yet...but I think I am close. Happy DevOps-ing, Carl

REST from Boston

Image
Realizing it's been a long time since I (published) a blog entry, here's what I am up to at the moment...I happen to be in Boston to catch a Red Sox game and I have some down time. I am coding a REST client for the Domino Access Services which are nicely documented here .  This is one of those project that might take a throw-away effort or two before anything becomes of it but it's one that I think illustrates a couple of other nice projects. It seems to me that over the years, Spring is one of those technologies that folks love or very strongly dislike.  Personally, I think it's like most solutions: if you apply it when it makes sense, it's good stuff.  Forcing technologies that don't fit a problem is asking for frustration. If you're coding in Java and need to consume a REST web service, the Spring RestTemplate is worth a look . Another library I have used several times lately is OWNER   If you Java application utilizes properties, check it out...

JavaOne 2014

It was nice to get back to San Francisco for another JavaOne.  This year did not surprise me in any way with announcements but it did feel like a JavaOne filled with energy and enthusiasm.  I think getting Java 8 out and accepted was the primary reason but there are other significant ones. First off, being a NetBeans fan, I very much appreciated NetBeans day and sessions throughout the conference in which it was mentioned and utilized.  While I have known my way around Eclipse for years (and I have used Intellij), when I tell folks I prefer to use NetBeans I get an occasional strange look or question but that's becoming less so. If you don't know about NetBeans, I suggest downloading and giving it a serious look.  If it's the choice of James Gosling and guys who write code for NASA, how can you not check it out?   Geertjan Wielenga, the guy I consider the face of NetBeans, was very visible at JavaOne/NetBeans Day this year (as were quite a few others from t...

Five Favorite NetBeans IDE features

Image
Thinking about it earlier today, I have been using NetBeans before (or after actually) it was called NetBeans.  I say after, because I remember using Forte but it was called NetBeans before and after Forte.  To put that into some perspective, some years ago I was at a JavaOne (2002?) at a Meet the Forte Tools Experts session.  NetBeans has come along way since those days but I recall seeing a lot of promise which has been a reality for a long time now. The first thing I liked, and still like, about NetBeans was that it has a familiar look.  This may be because I was a long time Delphi and JBuilder user, both Borland IDEs, and NetBeans was, at least to some extent, inspired by Delphi's IDE style and functionality.  NetBeans feels natural to me and I think it is generally very approachable for new developers. Out-of-the-box functionality is my second reason for liking NetBeans.  I install the full version of NetBeans on OS X, Linux, and Windows and I am ...

End of a run and a new favorite?

I just came across a relatively new podcast called The Web Platform Podcast   The Web Platform Podcast is hosted by Erik Isaksen  ( @eisaksen )  and  Christian Smith ( @anvilhacks ). While I there are a few regular technical podcasts I try to make time for, I have been looking for something like what I think this is/will be ever since  The Java Posse  slowed or stopped, I am not sure which. The guys from the Java Posse had a unique blend of current technology, Java/JVM, humor, and overall production quality.  Joe, Tor, Dick, and Carl set the bar pretty high in my mind but like many good things they sometimes come to an end.  [I realize it's been some time since Chet replaced Joe but there have not been too many recorded episodes since then.]  I don't mean to discount the Roundup sessions because some are very good but they are sometimes hard to hear. I do hope The Web Platform Podcast both lives up to it's deep dive of "...'all things' w...

Themes for NetBeans

I have no idea how long this site has been around or how I missed it until very recently but I am glad I found it.  If you like NetBeans but would like to change the colors to match another favorite IDE or editor, there's a chance someone has already done it.  Check it out here Happy editing, Carl

JNLP: note to self

Java security was a hot topic in 2013 and I think it will continue to get some attention as tooling catches up to the newer requirements.  Signing the JNLP for Java Web Start programs is now required. The Java Web Start maven plugin does not yet sign the JNLP file but there is an outstanding issue which I imagine will be resolved before too much longer. In the meantime, this blog entry  and this stack overflow question and answer  may be all you need to get your JNLP signed correctly. The way I read it, you have two choices. First you can create a template file which should be named APPLICATION_TEMPLATE.JNLP in src/main/resources/JNLP-INF and wildcards are permitted.  This is nice if you have the need to deploy your application from more than one server. The second method involves creating a file named APPLICATION.JNLP also in the src/main/resources/JNLP-INF folder.  This file must match the application's jnlp file exactly. Don't forget to mo...

Glassfish JNDI settings

Image
Recently we had the need to add some configurable settings (such as user credentials) in a Java EE 7 application running on Glassfish 4.0. An example method to read the values might look like this:     private String getUserProperty(String property) {         String result = "";         Properties properties;         try {             InitialContext context = new InitialContext();             properties = (Properties) context.lookup("jndi/userinfo");             result = properties.getProperty(property);             context.close();         } catch (NamingException e) {         }         return result;     } Setting the values via the Glassfish console is achieved via Resources -> JNDI -...

NetBeans 7.4 recent projects

Image
Recently I had the need to remove one project from my recent projects list in NetBeans.  The problem was I had opened a very large project which was causing the    I found a few references to where one might find the file which contains the recent project list for older versions of NetBeans but they seemed to be a little dated.   The file I wanted to find and edit is called projectui.properties I happen to be on a Mac so that file could be found here: ~//Library/Application Support/NetBeans/7.4/config/Preferences/org/netbeans/modules I opened the file with a text editor and looked for the project name in the openProjectsDisplayNames entries.  Each of the entries include a dot followed by a number at the end to make them unique.  Once I found it, I noted the number and deleted that line.   Next I removed the corresponding entries in the openProjectsIcons and openProjectsURLs sections as well. I have a cou...

LibreOffice

I was recently asked about Mac/OS X software which can read and write WordPerfect format files.  As a not-so-regular but long-time OpenOffice user, the OpenOffice/LibreOffice debacle immediately came to mind.  There were numerous articles and blogposts written about the situation including a good bit of FUD.  The net effect on me is that I don't immediately know which one to recommend, assuming such a solution is otherwise in the best interest of the user. Ultimately I tested LibreOffice 4.1.4 on a couple of handy WP files I had handy and it worked well enough for my own needs.  [The latest version of OpenOffice I had installed would not read WordPerfect files but I believe I have used a filter to do so in the past.] The trick, however, seemed to be actually downloading a current copy from the LibreOffice site .  Perhaps I caught it at a bad time, but I had to try three mirror sites before I could get anything close to a reasonable download speed or worse ...

Complex JAX-RS

Working with JAX-RS to create a REST web service, I recently had the need to accept a List of a complex type as a parameter.  I was not able to find a complete example but I did read some Jersey documentation which I had not looked at in quite some time.  I read the  Jersey Parameter Annotations  section. The issue I was running into was the lack of a constructor for the complex type I wanted to pass in a list as a parameter to a REST web service method.  The documentation made me realize that I did not have a constructor which accepted a single String parameter from which an instance could be properly created. I also had some trouble with JSON marshalling/unmarshalling.  This may be a topic for another time but for now I solved it using the ObjectMapper from Jackson. Ultimately I put a trivial demo app together which is available here .  The application was created using NetBeans 7.4 as a maven web app to run on Glassfish 4.0 for convenience. ...

Out-of-the-box

The Intellij  IDEA IDE from JetBrains is one of those tools I have wanted to like for years now but it seems I am coming at things from a different perspective and so far it has not worked for me. I take it for a spin now and then (purchased licenses several times over the years to go beyond a short evaluation) and I thought the recent release of 13 signaled it was time to try it again. I downloaded the free Community Edition.  I decided to create a JavaFX application as my first action.  I tried it on a MacBook which happen to have a recent build of Java 8 on it.  IDEA found the JDK (this may have been from a previous installation) OK but the app would not run. The Fatal Error that greeted me after I clicked the Run button was:  unable to find package java.lang in classpath or bootclasspath My correction was to remove and add back the SDK.  (File -> Project Structure -> SDKs)  I'm not sure how extreme this might be considered by IDEA lo...

End of an Era

Given that I have been staying up a bit later than usual in recent weeks to watch my Red Sox successful quest to win another title, my schedule has been slightly off. Among other items, I almost missed the fact that Roger Brinkley recorded his last episode of the Java Spotlight Podcast . The episode, number 150, is a particularly good one IMHO because it's an interview with James Gosling.  Certainly some of what was asked and answered is not necessarily news but it is a very nicely done casual interview with one of our industry greats.  Hearing his perspective and knowing he is happily coding mostly Java using NetBeans made me smile.  Being a positive guy and wanting relative peace and harmony in our field, not to mention the world in general, I really appreciated hearing James say that he feels Oracle has been a good steward of Java. While I agree with the sentiment, I think because many, including James, did not expect it, the FUD-effect has lingered.  When J...

Mavericks

Earlier today I installed Mavericks on my MacBook Pro.  I found I had to reinstall Java 7 (JRE) in  order to get the Java Control Panel back.  I was also prompted to reinstall Java 6 when I started an older Java application. As far as NetBeans 7.4 development goes, I have not yet noticed any problems. All in all, so far...so good.

Glassfish Informix JDBC

Image
I recently had a need to get an Informix database connection going on Glassfish .  This is documented but what I found was not quite enough to get me going. I was using the JDBC driver from IBM .  After the driver is installed, there are six jar files in the lib directory.  Given that Informix is one of our primary databases, we use this driver with a variety of Java-based development tools.  Typically this involves making the ifxjdbc.jar file available on the CLASSPATH and you're good to go. In order to create an Informix JDBC Connection Pool in Glassfish,  I found that I needed to put both the ifxjdbc.jar and the ifxjdbcx.jar files in Glassfish lib directory. I used javax.sql.DataSource as the Resource Type and entered com.informix.jdbcx.IfxDataSource as the Datasource Classname . The additional settings properties I entered are pictured below. HTH, Carl 

The Mule ESB Cookbook Review

Not that long ago I began to read for review purposes the Mule ESB Cookbook.  I will start by saying I was a bit disappointed but there's certainly a possibility that my definition of a cookbook is a bit more picky that what the authors have in mind. I will say the book is generally well written and has source code references as one would expect.  When I compare the book to the documentation and examples from MuleSoft, I don't see a strong advantage with the cookbook. Generally speaking I like a cookbook to contain a recipe or two of a pattern I might want to create or something similar to it.  I don't expect to find a lot of getting started material or basic examples but then that's me.  To be fair, if you have no experience with Mule ESB (and you happen to be running Windows), this may well be a good "zero to mid-range-speed" how to guide.  For me it's a bit basic and if one is already familiar with Eclipse or an IDE which leverages Eclipse, there...

Now THAT's cool

I really do enjoy my job (for the most part) and staying current with technology, while certainly not totally attainable, is something I enjoying trying to achieve. SOA, NoSQL databases, new(ish) mobile development are a few of the technology spaces that grab my regular interest these days.  Every now and then something comes along that literally makes me fire off a positive email, tweet, blog entry, or comment to colleagues. I am very much aware of the future potential of cloud IDEs and codenvy is not something that's been off my radar.  A short while ago I got an email from codenvy that made me say "wow, now that's cool." Check it out...codenvy will now let you create an app, from a template, instantly, and without even signing in. They have built technology which creates an app, from a template, in a temporary workspace faster than some folks can get their favorite IDE to (fully) load.  In my case that may well depend upon how many projects I tend to leave ...

A Cookbook

I just started reading Mule ESB Cookbook  from Packt Publishing.  If you're like me, the "cookbook" connotation brings to mind the idea that one can use the book when a good "recipe" is needed in this case for Mule ESB.  In my experience I find such a book useful when I am first learning a technology or perhaps if I have not used the technology for a particular use case.  In most such situations there's probably not an exact match for what I might need but if it's a good book, the various solutions should include one that's in the ballpark.  I will follow up this short entry with my impressions after I have completed the book. Until then, happy coding. Carl