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.


Before yesterday I wrote about Wojtek Jurewicz being in CERN and having fun skiing and drinking Swiss bear and resolving Leonardo’s Da Vinci Code issues. Accidentally I’ve a blog about around the world trip and it turned out it is established by my friends from high school. Congratulations Paulina & Tomek! That is truly enviable. That is amazing website and amazing trip. I am following your posts. My spirit is right there were you are :) I recommend reading (you better know polish, it will be just easier to understand) Around The World – HenHen.pl