I like to read techcrunch.com the post very often and very very interesting things and ideas to follow. One of them I got after reading the article about drons. After that article I typed in google “how to build a drones” and found very interesting tutorials: diydrones.com and aeroquad.com from another TechCrunch article.
I found if someone has passion and energy and time. ( like my brother-in-law he has lot’s of time but he is fucking lazy ass and not motivating potato crisps eater) Could make a great business of making those drones and sell them to all groups of fans especially here in my country where you have problems to buy anything cool.


I’ve already mentioned about that project. We used great library for it it’s called TinyRadius. In the sources you get extra example codes of TestClient and TestServer implementation. That is really helpful. The project is written using Netbeans and Maven tools. That is really comfortable. You just got your pom.xml and it does care about all dependencies. It’s simply download them from the web.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <name>MyWebRadiusServer JEE5 Webapp</name>


That is simply amazing technique. To start and instance of the server I implemented well know ServletContextListener :)

public class ActivatorServletContextListener implements ServletContextListener {

    MyRadiusServer server = new MyRadiusServer();

    public void contextInitialized(ServletContextEvent arg0) {
        server.start(true, true);
        System.out.println("Server started.");

    public void contextDestroyed(ServletContextEvent arg0) {
        System.out.println("Stop server");

It does a great job too. And for logs we used log4j, it cool also. You can drive your logs wherever you want. Here is log4j.properties file: (from path src/main/resources)

# #### Use two appenders, one to log to console, another to log to a file
 log4j.rootCategory=debug, R
# #### First appender writes to console
# # Pattern to output the caller's file name and line number.
 log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F%L) - %m%n

log4j.appender.R = org.apache.log4j.DailyRollingFileAppender
log4j.appender.R.File = logs/my-radius.log
log4j.appender.R.Append = true
log4j.appender.R.DatePattern = '.'yyy-MM-dd
log4j.appender.R.layout = org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} %c{1} [%p] %m%n


Hi, lately I wrote about radius project. It’s already done. Now we are testing. But in a meantime I just want to mark one thing about sending jms message to remote server. All you need to do is to set “addresslist” property in QueueConnectionFactory on local machine and of course create comparable QueueConnectionFactory on remote.
Glassfish Admin Panel / Resources/ JMS Resources/ connection factories:
jms/akira/connectionfactory + property addresslist= (host:port)
Glassfish Admin Panel / Resources/ JMS Resources/ JMS Destination Resources
jms/queue/devilman + queue name devilman
and simple example of code to send msg using that remote JMS Connection Factories

    public void sendTestMSg(String msgText) throws NamingException, JMSException {
        QueueConnection queueCon = null;
        try {
            // get the initial context, refer to your app server docs for this
            Context ctx = new InitialContext();

            // get the connection factory, and open a connection
            QueueConnectionFactory qcf = (QueueConnectionFactory) ctx.lookup("jms/akira/connectionfactory");
            queueCon = qcf.createQueueConnection();

            // create queue session off the connection
            QueueSession queueSession = queueCon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);

            // get handle on queue, create a sender and send the message
            Queue queue = (Queue) ctx.lookup("jms/queue/devilman");
            QueueSender sender = queueSession.createSender(queue);

            Message msg = queueSession.createTextMessage("hello...");

            msg.setBooleanProperty("ACK_DEBUG", true);
            msg.setFloatProperty("ACK_BALANCE", 24234.44f);

            System.out.println("sent the message");
        } finally {
            // close the queue connection
            if (queueCon != null) {

And of course you need to make appreciate imports to test this method.
That was a simple tip. I was searching through the web for it and it wasn’t obvious to find it on oracle pages.


Here is a thanking e-mail I’ve got (that made me really happy and gave a good karma):

Hello Jan,
Regard http://www.jankowalski.pl/category/glassfish-2, I wish to thank you deeply for your explanations how you worked out the JB cache under Glassfish.

I have been spending hours just looking and trying several cache solutions. Finally the JB cache seemed promising, except all docs seemed made for the JB AS only. I was really on the point to give it up and either look for , again, another cache solution or , after all, start from scratch and write my own.

At that point I started to think about, if I was to write my own, I may use the servlet context to handle some kind of pointer to the cache. That is while looking for that I finally find your page, and thank you Jan, the information you gave I tried and it worked directly for me.

Thank you thank you thank you. Your idea of using the naming way in context and the code example made things crystal clear.

This should bring you good karma :)

Best regards,

Fabrice Duche


Radius protocol is some sort of radio channel to authorize. We are going right now to implement authorization system with using token sms and bind to ldap active directory. :) We found tinyradius library online.