When I started having the need of decoding JSON Web Tokens quite often, I felt the urge of writing a program that allowed me to do it quickly. There are excellent options, such as jwt.io, but as soon as you need to do this operation often it becomes clumsy. And if you need to process multiple tokens, or further process the output, it ...
Read More »Home »
Installing Drupal on FreeBSD
Drupal ports have been available on FreeBSD since quite a long time, and binary packages can be installed very quickly. However, manual setup is required to connect Drupal to the database and have Apache serve the Drupal website. In this post I’ll describe the setup procedure of Drupal 7 on FreeBSD 10.0. The process will not be very different if ...
Read More »Installing Logstash v 1.4 (and Greater) on FreeBSD
In a previous post I described how to install Logstash (v. 1.3 and previous) on FreeBSD and in this post I will describe how to install Logstash v. 1.4 and greater. Until version 1.3 included, Logstash was distributed as a single JAR file, and when version 1.4 was released a new packaging style was introduced. As a consequence, new instructions ...
Read More »Google Authenticator: Using It With Your Own Java Authentication Server
The Google Authenticator application for mobile devices is a very handy application that implements the TOTP algorithm (specified in RFC 6238). Using Google Authenticator you can generate time passwords that can be used to authorize users in an authentication server that shares the secret key of the requesting users. Google Authenticator is mainly used to access Google services using two-factor ...
Read More »Using a ThreadPoolExecutor to Parallelize Independent Single-Threaded Tasks
The task execution framework, introduced in Java SE 5.0, is a giant leap forward to simplify the design and the development of multi threaded applications. The framework provides facilities to manage the concept of task, to manage thread life cycles and their execution policy. In this blog post we’ll describe the power, the flexibility and the simplicity of this framework ...
Read More »EJB 3.1 Global JNDI Access
As outlined in the previous parts of this series, the major drawback of the EJB v. 3.0 Specification was the lack of portable global JNDI names. This implies that there’s no portable way to link EJB references to a bean outside your application. The EJB v. 3.1 Specification fills this gap defining, in its own words: “a standardized global JNDI ...
Read More »References to EJBs Outside Your Application With Oracle WebLogic
In the previous posts we made an overview of the EJB v. 3.0 and of the portable mechanisms it provides you to build your Java EE application. Since Java EE specifications are all about portability, at the risk of repeating ourselves we’ve often stressed the most important portability limit still present on the EJB v. 3.0 specifications: there is no ...
Read More »EJB Programmatic Lookup
In our previous post we learnt about EJB references and EJB injection. Even though EJB injection is a powerful container facility that eases modular application development, sometimes performing a programmatic EJB lookup is instead desirable. Let’s suppose, for example, that a set of distinct EJBs implement a common strategy, defined by a common business interface. Depending on the result of ...
Read More »Basic EJB References, Injection and Lookup
In the first part of this series we’ve introduced the mechanisms provided by the Enterprise JavaBeans v. 3.0 Specification to define EJB components, declare a reference to an EJB and wiring them up both by dependency injection or programmatic JNDI lookup. In this blog post we’ll examine some basic examples to understand how to use the EJB API. A Basic ...
Read More »