Skip to main content

Welcome to Geoff Hayward's Weblog

Commenting on Java, JavaFX, Java EE, Joomla, and IoT.

I have been experimenting with the Twitter Bower package manager as part of the tech stack to be used with a Java EE JSF project.

This post is a note on how I set up the Web Application project to use the Bower package manager.

I began by setting up a new Mavan Web Application. I used the NetBeans 'New Project' wizard. Once the new Web Application project was created I added JavaServer Faces to the project via NetBeans' Properties > Framework menu.

Next I added a .bowerrc file to the root of the webapp as:

{
  "directory": "resources/components"
}

This .bowerrc file changes the default location that Bower will store the components it downloads. This change made Bower fit with a Mavan Web Application folder structure. Next I added a bower.json file to the root of the webapp.

{
  "name": "bower-setup-test",
  "authors": [
    "Geoffrey Hayward"
  ],
  "private": true
}

The bower.json file keeps a record of each dependency and its version that is added to the project. See the bower.json spec for details.

Then from the root of the webapp I ran the command: bower install bootstrap --save. The --save saved the dependency to bower.json file.

Why Bower? Good question. To reduce the size of the tracked GIT repository and to make the web component libraries explicit. Each time a file is forked from the dependency, such as a bootstrap LESS variables file, you add it to the bower.json ignore property. Likewise you then begin tracking the forked file in GIT. Everything that is managed by Bower (that is not forked) is in (or should be in) the .gitignore file.

My Thoughts: Post Experiment

My thoughts to using Bower with a Java EE JSF project are Bower adds complexity to a Java EE JSF project that may not bring any value. But, with that said Bower certainly would come in handy for a front-end framework heavy project; particularly when some control over what should and should not be edited is needed. In other words I am undecided for now, but have no plans to start using Bower just yet in this context.



Read

I have been struggling to configure the Java EE WildFly application server's Logging subsystem. I was finding that any changes to the configuration within domain.xml where not making any difference to what was or was not actually being logged. I finally got to the bottom of the issue.

The project, I am working on, used to run with embedded Jetty. This means some old configuration files have hung around erroneously. The old configuration files should have been deleted - but never was.

What I have learnt: WildFly's Logging subsystem uses deployment level configuration over container level configuration by default. That means old Log4j configuration files were being read by WildFly. Once I removed the old Log4j configuration files WildFly began logging as expected.

I have found out that any of the file names in the following list documented by Ritchie (2014) will be read as deployment level configuration by WildFly.

  • logging.properties
  • jboss-logging.properties
  • log4j.properties
  • log4j.xml
  • jboss-log4j.xml

Hope this helps.


Ritchie, C. 2014. WildFly Configuration, Deployment, and Administration (Second Edition), Packt Publishing, p 56.



Read

Here are the photos I took at Devoxx Poland Java conference this year.

 



Read

This Sunday I am heading to Krakow to attend the 2015 Devoxx Poland Java conference. It's the first Devoxx in Poland. The conference has sold out all of its 2000 tickets. Wow, 2000 Java programmers in one place at one time. I can hardly wait. The conference commences on Monday and runs for three days.

I have planned out which talks I'm hoping to watch. Being keen on distributed computing, I am looking to go to most of the microservices talks. I would like to learn what's new in microservices (slash distributed computing), how it's being done nowadays, and what the current known pros, cons, issues and solutions are.

The conference has a few interesting looking talks on security too. I am hoping to go to the security talks. Being keen on RESTful web services, I would like to go to Erik Jan de Wit talk on OAuth2.

As well as the great content of the conference, I'm looking forward to the opportunity of chatting with other Java developers. Devoxx Poland here I come.



Read

After several weeks of programming a bespoke blogging platform it's finished. Well kind of finished. I will get to that. The blogging platform is for Web Developers, who need the back-end application part of a platform but do not wish to be tied to one language and template engine for their own front-end development work.

Why the need? I decided to create my new website with Java EE 7. I am a huge fan of Java EE 7 and JSF 2.2. The blogging platform is simply a by-product of that wish.

In the next iteration I intend to crate a REST API so that the front-end can be an authenticated REST client. Thus achieving the goal of language and template engine independence. In the meantime I'm road testing the blog platform with my own website. Once the next iteration is ready I will probably commit the platform to a public GitHub repository. You can find more information about the blog platform over at javablogplatform.blogspot.co.uk/.

Why the new website? My blogging goal has changed since creating the old website. I wish to have more of a weblog. The subject area of this new website will be anything Java EE, Software Development, and MSc study related. I have of course imported the content from my older blog.

So here goes



Read

Mailing List

Responsive Media

With the ResponsiveMedia plugin for Joomla it is easy to add 3rd party content from YouTube, Vimeo, and Instagram right in to any Joomla! article.

ResponsiveMedia