Firefox for iOS Gets Faster, Easier to Use

Tyler Lacroix (my son) has been working at Mozilla’s Toronto office this summer as an intern. He’s been lucky to be doing new development work for Firefox on iOS. He’s been telling me about some of the new features he has been adding to Firefox and now it has been released to the public.

Tyler also did a presentation of his work to local colleagues and remote people. In the video, Tyler is in the middle box and there are 2 boxes with people watching from Mt. View, CA and Portland, OR. His is labeled ‘A Swifty Internship’. https://air.mozilla.org/a-swifty-internship/

Regards,
Roger Lacroix
Capitalware Inc.

iPhone, iPad & iPod Touch, Open Source, Programming Leave a comment

Robin Wiley will be Speaking at MQTC v2.0.1.6

Robin Wiley of Robin Wiley Training will be speaking at MQ Technical Conference v2.0.1.6 (MQTC).

    Robin Wiley’s Session:

  • MQ-DataPower Connectivity Deep Dive

For more information about MQTC, please go to:
http://www.mqtechconference.com

Regards,
Roger Lacroix
Capitalware Inc.

Capitalware, Education, MQ, MQ Technical Conference Leave a comment

Finally, a Beta of MQ Visual Edit V2

Finally, is an understatement. In December 2014, I decided it was time for version 2 of MQ Visual Edit. I had already done sketches of what MQ Visual Edit V2 should look like a couple of years earlier, so it was time to get rolling on the coding of it.

I decided that version 2 was going to fix everything, inside and out, that was wrong or just implemented poorly and at the same time give MQ Visual Edit a face-lift. I figured it would take roughly 6-8 months and I wanted a working beta for MQ Technical Conference v2.0.1.5 (MQTC). Well, MQTC v2.0.1.5 was held at the end of September 2015 and clearly I missed that deadline!!!

Without a doubt, I totally underestimated the amount of work involved in rewriting the internals and creating a new face (GUI) for MQ Visual Edit. Most of the work involved redoing the GUI frames, windows and panels. MQ Visual Edit V2 uses Docking Frames for the framework and MiGLayout for the component layout of the windows and panels. My goal was to really push the visual bounds and to provide lots of information without overloading the user. Have a look at the screen-shots below (click on the image to see a larger image) and see what I’m talking about. Note: MQ Visual Edit V2 is NOT an Eclipse based product. The frame presentation is done with the open source product ‘Docking Frames’. Very cool. πŸ™‚

My aim with MQ Visual Edit V2 was to use the built-in MQ classes of IBM MQ V8 and stop using my own homegrown MQ classes (where possible). If you read some of my previous blog postings, you will note that I have had difficulty with a couple of MQ classes (i.e. MQMD) and decided to continue to use my own. I have even had issues with creating custom MQ classes which the MQ Knowledge Center says works.

So, if you are an active MQ Visual Edit user (i.e. daily user) and would like to try out a beta of MQ Visual Edit V2 then send an email to support@capitalware.com . Note: It is a beta, so be warned things will not be perfect. Also, MQ Visual Edit V2 will install in a different directory with different icons, so you can actually have the beta and the older version of MQ Visual Edit installed on your PC.

Here’s a screen-shot of the main window (click on the image to see a larger picture):

Here’s screen-shots of the insert and message edit windows (click on the image to see a larger picture):

Insert
Message Edit
Message Descriptor
Named Properties

Starting with MQ Visual Edit V2, the licensing model will change to be subscription based model meaning there will be no upfront software cost, only a yearly subscription fee.

Why am I changing the licensing model? In 2003, when MQ Visual Edit V1 was launched, I created a reverse pyramid scheme without realizing it. By reverse pyramid scheme, I mean, the users who purchase licenses today, are actually paying for the support of the users who purchased MQ Visual Edit years and years ago. i.e. The users at the bottom of the pyramid are reaping the benefits and are not paying for new releases, bug fixes, patches, etc. Hence, I need to bring the licensing model in line for the next 13 years.

I’ll write more about the subscription licensing model in the future.

Regards,
Roger Lacroix
Capitalware Inc.

Capitalware, Linux, Mac OS X, MQ, MQ Visual Edit, Windows 5 Comments

MQTC v2.0.1.6 Gold Sponsor: TxMQ

Capitalware would like to announce that TxMQ is a Gold Sponsor of MQ Technical Conference v2.0.1.6 (MQTC).

For more information, please go to: http://www.mqtechconference.com

Regards,
Roger Lacroix
Capitalware Inc.

Capitalware, Education, MQ, MQ Technical Conference Leave a comment

Chris Frank’s Sessions for MQTC v2.0.1.6

Chris Frank of IBM will be speaking at MQ Technical Conference v2.0.1.6 (MQTC). Chris Frank will be presenting the following sessions at MQTC:

  • More Mysteries of the MQ Logger
  • Using MQ from IIB on Cloud Implementations
  • Performance Considerations When Designing IBM Integration Bus solutions

For more information about MQTC, please go to:
http://www.mqtechconference.com

Regards,
Roger Lacroix
Capitalware Inc.

Capitalware, Education, MQ, MQ Technical Conference Leave a comment

Calling IBM MQ from Go Applications

Mark Taylor of the IBM UK MQ Labs has published a blog entry on how to use IBM MQ from a Go application. You can read about it at:
https://www.ibm.com/developerworks/community/blogs/messaging/entry/Calling_IBM_MQ_from_Go_applications

I’m kinda surprising that IBM hasn’t created an interface between IBM MQ and Swift, since I get monthly emails from IBM telling me that I can try out Swift programming on a Linux VM.

Regards,
Roger Lacroix
Capitalware Inc.

MQ, Open Source, Programming Leave a comment

Eclipse 4.6 (Neon) Released

On June 22nd, 2016, Eclipse Foundation has released the annual Eclipse release train:
https://www.eclipse.org/org/press-release/20160622_neon.php

    Key Highlights of Neon Release

  • Eclipse JSDT 2.0:New tools for JavaScript developers, including a JSON editor, support for Grunt/Gulp and a new Chromium V8 Debugger.
  • Platform and JDT Features: Key Eclipse Platform improvements are HiDPI support and autosave. JDT’s Content Assist now highlights matched characters and provides substring completion.
  • Updated PHP Development Tools Package (PDT): New Eclipse PDT 4.0 release for PHP developers with complete support for PHP 7 and improved performance.
  • Automated Error Reporting (AERI): The Eclipse Automated Error Reporting client can now be integrated into any third-party Eclipse plug-in or standalone RCP application.
  • Docker Tooling: Introducing improved support for Docker Tooling.
  • Eclipse User Storage Service (USS): Introducing the Eclipse USS, a new storage service from the Eclipse Foundation, that allows projects to store and retrieve user data and preferences from our servers creating a better User Experience (UX) for developers.
  • New Projects: Buildship: Eclipse Plug-ins for Gradle (first prime release), EGerrit, Paho, Andmore – Eclipse Android Tooling, EMF Parsley and Eclipse Tools for Cloud Foundry.
    • Eclipse is an open source community, whose projects are focused on building an open development platform comprised of extensible frameworks, tools and runtimes for building, deploying and managing software across the lifecycle. The Eclipse Foundation is a not-for-profit, member supported corporation that hosts the Eclipse projects and helps cultivate both an open source community and an ecosystem of complementary products and services.

      Regards,
      Roger Lacroix
      Capitalware Inc.

C, C++, Java, JMS, Linux, Mac OS X, Open Source, Programming, Windows Leave a comment

Fedora 24 Released

Fedora Project Contributors has just released Fedora v24.
https://fedoraproject.org/wiki/Releases/24/ChangeSet

Fedora is a Linux-based operating system, a suite of software that makes your computer run. You can use the Fedora operating system to replace or to run alongside of other operating systems such as Microsoft Windows or Mac OS X. The Fedora operating system is 100% free of cost for you to enjoy and share.

Regards,
Roger Lacroix
Capitalware Inc.

Linux, Open Source, Operating Systems Leave a comment

Another Sample Java/MQ Program – MQWrite2

Someone over at Stack Overflow posted a question about logging MQ error messages to a file. After the user updated the posting, I recognized the code as mine (MQWrite.java) that I wrote back in 2000 (Yup, 16 years ago!!).

So, I decided to bring MQWrite.java into this decade and created MQWrite2.java. Here is MQWrite2.java that sets the connection information in a HashTable and uses Log4J as the logger. (You can download it from here.)

import java.io.IOException;
import java.util.Hashtable;

import org.apache.log4j.Logger;

import com.ibm.mq.MQException;
import com.ibm.mq.MQMessage;
import com.ibm.mq.MQPutMessageOptions;
import com.ibm.mq.MQQueue;
import com.ibm.mq.MQQueueManager;
import com.ibm.mq.constants.CMQC;

/**
 * Program Name
 *  MQWrite2
 *
 * Description
 *  This java class will connect to a queue manager and
 *  and write a message to a queue.
*
 * Sample Command Line Parameters
 *  -h 127.0.0.1 -p 1414 -c TEST.CHL -m MQA1 -q TEST.Q1
 *
 * @author Roger Lacroix, Capitalware Inc.
 */
public class MQWrite2
{
   private Logger logger = Logger.getLogger(MQWrite2.class.getName());
   private Hashtable<String, String> params = null;
   private Hashtable<String, Object> mqht = null;
   private String qMgrName;
   private String outputQName;

   /**
    * The constructor
    */
   public MQWrite2()
   {
      super();
      logger.info("MQWrite2 is now starting.");
   }

   /**
    * Make sure the required parameters are present.
    * @return true/false
    */
   private boolean allParamsPresent()
   {
      boolean b = params.containsKey("-h") && params.containsKey("-p") &&
                  params.containsKey("-c") && params.containsKey("-m") &&
                  params.containsKey("-q");
      if (b)
      {
         try
         {
            Integer.parseInt((String) params.get("-p"));
         }
         catch (NumberFormatException e)
         {
            b = false;
         }
      }

      return b;
   }

   /**
    * Extract the command-line parameters and initialize the MQ variables.
    * @param args
    * @throws IllegalArgumentException
    */
   private void init(String[] args) throws IllegalArgumentException
   {
      params = new Hashtable<String, String>();
      if (args.length > 0 && (args.length % 2) == 0)
      {
         for (int i = 0; i < args.length; i += 2)
         {
            params.put(args[i], args[i + 1]);
         }
      }
      else
      {
         throw new IllegalArgumentException();
      }

      if (allParamsPresent())
      {
         qMgrName = (String) params.get("-m");
         outputQName = (String) params.get("-q");

         mqht = new Hashtable<String, Object>();

         mqht.put(CMQC.CHANNEL_PROPERTY, params.get("-c"));
         mqht.put(CMQC.HOST_NAME_PROPERTY, params.get("-h"));

         try
         {
            mqht.put(CMQC.PORT_PROPERTY, new Integer(params.get("-p")));
         }
         catch (NumberFormatException e)
         {
            mqht.put(CMQC.PORT_PROPERTY, new Integer(1414));
         }

         // I don't want to see MQ exceptions at the console.
         MQException.log = null;
      }
      else
      {
         throw new IllegalArgumentException();
      }
   }

   /**
    * Connect, open queue, write a message, close queue and disconnect.
    *
    */
   private void testReceive()
   {
      int openOptions = CMQC.MQOO_OUTPUT + CMQC.MQOO_FAIL_IF_QUIESCING;
      MQPutMessageOptions pmo = new MQPutMessageOptions();
      MQQueueManager _qMgr = null;
      MQQueue queue = null;
      MQMessage sendMsg = null;
      String line = "This is a test message.";

      try
      {
         _qMgr = new MQQueueManager(qMgrName, mqht);
         queue = _qMgr.accessQueue(outputQName, openOptions);

         sendMsg = new MQMessage();
         sendMsg.messageId = CMQC.MQMI_NONE;
         sendMsg.correlationId = CMQC.MQCI_NONE;
         sendMsg.writeString(line);
         // put the message on the queue
         queue.put(sendMsg, pmo);
         logger.info("MQWrite2 Message inserted: " + line);
      }
      catch (MQException mqex)
      {
         logger.error("MQWrite2 MQException CC=" +mqex.completionCode + " : RC=" + mqex.reasonCode);
      }
      catch (IOException e)
      {
         logger.error("MQWrite2 IOException " + e.getLocalizedMessage());
      }
      finally
      {
         try
         {
            if (queue != null)
               queue.close();
         }
         catch (MQException mqex2)
         {
            logger.error("MQWrite2 MQException CC=" +mqex2.completionCode + " : RC=" + mqex2.reasonCode);
         }
         finally
         {
            try
            {
               if (_qMgr != null)
                  _qMgr.disconnect();
            }
            catch (MQException mqex3)
            {
               logger.error("MQWrite2 MQException CC=" +mqex3.completionCode + " : RC=" + mqex3.reasonCode);
            }
         }
      }

      logger.info("MQWrite2 is now ending.");
   }

   /**
    * main line
    * @param args
    */
   public static void main(String[] args)
   {
      MQWrite2 write = new MQWrite2();

      try
      {
         write.init(args);
         write.testReceive();
      }
      catch (IllegalArgumentException e)
      {
         System.out.println("Usage: java MQWrite2 -h host -p port -c channel -m QueueManagerName -q QueueName");
         System.exit(1);
      }

      System.exit(0);
   }
}

And here is the ‘log4j.properties’ file that goes with the code (it is included in the download):

#
# stdout
#
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%m%n
#
# MQWrite
#
log4j.category.MQWrite2=DEBUG, mqwrite, stdout
#log4j.category.MQWrite2=INFO, mqwrite, stdout
# "mqwrite" appender writes to a file
log4j.appender.mqwrite=org.apache.log4j.RollingFileAppender
log4j.appender.mqwrite.File=log/MQWrite.log
log4j.appender.mqwrite.MaxFileSize=1000KB
log4j.appender.mqwrite.MaxBackupIndex=9
log4j.appender.mqwrite.layout=org.apache.log4j.PatternLayout
log4j.appender.mqwrite.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %p - %m%n
#log4j.appender.mqwrite.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %p (%F:%M:%L) - %m%n

Make sure you create a ‘log’ directory under the directory where you run the code from or else it will throw an error like:

log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: log\MQWrite.log (The system cannot find the path specified)

Regards,
Roger Lacroix
Capitalware Inc.

IBM i (OS/400), Java, Linux, Mac OS X, MQ, Programming, Unix, Windows Leave a comment

A Tip for Handling Java/MQ Internal Message Class

Here’s an interesting head-scratcher. I was writing some Java code to handle an MQ message and in this particular case, it was an MQRFH2 message. The code below was working fine until I decided to dump (output) the message in hexadecimal.

int openOptions = CMQC.MQOO_INQUIRE + CMQC.MQOO_FAIL_IF_QUIESCING;
MQGetMessageOptions gmo = new MQGetMessageOptions();
gmo.options = CMQC.MQGMO_NO_WAIT + CMQC.MQGMO_FAIL_IF_QUIESCING;
MQQueueManager _qMgr = null;
MQQueue queue = null;
MQMessage receiveMsg = null;
MQRFH2 rfh2;
byte[] b;
boolean getMore = true;

try
{
   _qMgr = new MQQueueManager(qManager);
   queue = _qMgr.accessQueue(inputQName, openOptions);

   while(getMore)
   {
      receiveMsg = new MQMessage();
      try
      {
         queue.get(receiveMsg, gmo);

         printMsgHex(receiveMsg);

         if (CMQC.MQFMT_RF_HEADER_2.equals(receiveMsg.format))
         {
            rfh2 = new MQRFH2(receiveMsg);
         }

         b = new byte[receiveMsg.getDataLength()];
         receiveMsg.readFully(b);
         System.out.println("Message data-> " + new String(b));
      }
      catch (com.ibm.mq.MQException e)
      {
         System.err.println("CC=" +e.completionCode + " : RC=" + e.reasonCode);
         getMore = false;
      }
      catch (java.io.IOException ioex)
      {
         System.err.println("ioex=" +ioex);
         getMore = false;
      }
      catch (MQDataException e)
      {
         System.err.println("CC=" +e.completionCode + " : RC=" + e.reasonCode);
         getMore = false;
      }
   }
}
catch (com.ibm.mq.MQException mqex)
{
   System.err.println("CC=" +mqex.completionCode + " : RC=" + mqex.reasonCode);
}
finally
{
   try
   {
      if (queue != null)
         queue.close();
   }
   catch (com.ibm.mq.MQException mqex2)
   {
      System.err.println("CC=" +mqex2.completionCode + " : RC=" + mqex2.reasonCode);
   }
   finally
   {
      try
      {
         if (_qMgr != null)
            _qMgr.disconnect();
      }
      catch (com.ibm.mq.MQException mqex3)
      {
         System.err.println("CC=" +mqex3.completionCode + " : RC=" + mqex3.reasonCode);
      }
   }
}

The printMsgHex() method is a simple method to retrieve the message and output.

byte[] b = new byte[msg.getMessageLength()];
msg.readFully(b);
etc...

When I would run the code, I would get the following error:

CC=2 : RC=6114

The MQ Knowledge Center says the following:

6114 (X'17E2') MQRC_INSUFFICIENT_DATA

Explanation:
There is insufficient data after the data pointer to accommodate the request. This reason code occur s in the WebSphere MQ C++ environment.

Completion Code:
MQCC_FAILED

I scratched my head and said WTF. I’m coding in Java but it is giving me a C++ error message. I commented out the printMsgHex() method and the code would work. I have used the printMsgHex() method for years. I looked at the code and nothing stood out. The only thing different about this code and the other code was the use of the MQRFH2 class.

I sat and stared at the code (we all know that works) and I could not see anything wrong with the code. As I sat scratching my head, I started thinking about the MQMessage class and it occurred to me that IBM implemented it like RandomAccessFile class. Then the light went on. I wondered if the MQRFH2 class reset the cursor position. So I added the following line before the call to the MQRFH2 class and bingo, everything started to work as expected.

receiveMsg.seek(0);

So, the bottom-line is if your code is going to mess around with the message then before using an internal message header class like MQRFH, MQRFH2, MQCIH, MQDEAD, MQIIH or MQXMIT, make sure you update the message’s cursor position to the correct location before passing the message to the class.

if (CMQC.MQFMT_RF_HEADER_2.equals(receiveMsg.format))
{
   receiveMsg.seek(0);
   rfh2 = new MQRFH2(receiveMsg);
}

Regards,
Roger Lacroix
Capitalware Inc.

IBM i (OS/400), Java, Linux, Mac OS X, MQ, Programming, Unix, Windows Leave a comment