A few months ago I wrote a few posts dealing with how to create a Merapi AIR to Java production environment. If any of you have read those posts or tried doing it yourself you’d realize what a tricky and cumbersome process it is. Now with AIR 2.0, we have native process available which allows us to reduce this workload significantly. To really take advantage of this new functionality, I built an AIR 2.0 to Java communication layer called Transmission. No more custom installers, requiring Java to start AIR, and keep-alive processes to ensure Java is still running.

While architecting this, I decided I wanted to create an environment that would be familiar for people coming from Merapi. There is still a concept of Message objects and MessageHandlers which respond whenever a Message object with its registered type is passed across Transmission. The library is being hosted on Google Code and is licensed under the Apache 2.0 license which gives you the freedom to use it in commercial applications. I included a demo in the repo that should help you get started.

Tags: , ,

17 Responses


  1. Rob McKeown on 26 Aug 2010

    I’m not sure if it is just me or not, but when I kill the AIR application, I can still see the javaw.exe process still running. Though, it seems that the AIR docs say that the native process will be killed automatically. I don’t know if this is an AIR bug or a Transmission bug. Anyone else seen this?

  2. Nate on 26 Aug 2010

    Hi Rob,

    Make sure to call Transmission.getInstance().exit(true) as your app closes to kill that process (I use the WindowedApplication close event normally). I forgot to add that to the demo app. I’ll be sure to update it.

  3. Rob McKeown on 26 Aug 2010

    thx… I also noticed that in Transmission.java there is a try/catch block that tries to find the .transmissionLog.log file. It if doesn’t find one, the FOS is null. But then the null FOS is used to create two TransmissionStandardStreams. As a result, in my app, it fails if I don’t have that log file. I’m not sure what is unique about my app that is different than the demo app except that, in my app, the handler is actually delegating the work to ANT. Perhaps something is trying to access it System.out? In any event, nothing is actually written to the file.

  4. Nate on 26 Aug 2010

    Hi Rob,

    Verified your error. It’s a null pointer. I will get it fixed later tonight. As a work-around, if you create a file in your user home directory (~/Users/nross83 on Mac or C:\Documents and Settings\nross83 on Windows) called .transmissionLog.log. All the System.out.printlns in your project will be written to that file for debugging purposes. I always have this file so that’s how the error slipped through.

  5. Rob McKeown on 27 Aug 2010

    no problem… That’s exactly what I did to get past it too.

  6. Nate on 29 Aug 2010

    The fixes have been pushed up. Go ahead and update. If you have any more problems make sure to file a bug in Google Code.

  7. Marc on 24 Sep 2010

    Just what I’m looking for! I checked out the demo/air/TransmissionDemo folder assuming the demo/java/TransmissionDemo portion was not required. Modified my javaw.exe path to match mine. Now I get a Java Virtual Machine Error – “Could not find Main Class”. Do I need additional SVN files to access var transmissionControllerPackage:String = “transmission.demo.TransmissionDemoController”; ? Help.

    -thanks Nate

  8. Nate on 24 Sep 2010

    Try SVN updating your TransmissionDemo Flex project (and your Transmission Flex library project as well if you checked that out too). I was able to reproduce your error and it should be fixed now.

    Good luck!

  9. James Ward on 29 Sep 2010

    Very cool! Have you tried this on AIR for Android yet? We need a simple way to communicate between a Java APK library and a Flex app.

  10. Nate on 30 Sep 2010

    Thanks! I haven’t tried it on Android yet, but I’ll look into it.

  11. James on 31 Oct 2010

    I tried out the Transmission but it use Nativeprocess to control IO message? It was not suitable to handle high load of data which will hang or crash. I wonder how Merapi fare compare to Transmission?

  12. Dewey on 05 Mar 2011

    Just downloaded and ran the demo code from SVN, however, I simply get the AIR window and no message being passed. Java seems to be called OK since I can cause it to throw an error if I change the -cp slightly. Does anyone have a clue why when running the demo why it would be unresponsive? Using Eclipse / Java 1.6.0_22 / AIR 4.5 SDK

  13. Mike on 17 Jun 2011

    would transmission work in this type of scenario??
    http://www.infoaccelerator.net/blog/post.cfm/rfid-enabled-air-applications-with-merapi

    i’m building an AIR app that will communicate with an RFID reader.

  14. Nate on 18 Jun 2011

    Yes, Transmission will work for your RFID application. Looks like a fun project. Good luck!

  15. vikram bhatla on 15 Jul 2011

    Can we do remote aliasing like we can do in Merapi.
    Something like this:
    [RemoteClass(alias="com.greenplum.messages.ConfigMessage" )]

  16. Nate on 15 Jul 2011

    Hi vikram, yes you can. Transmission uses the same AMF serialization libraries as Merapi, BlazeDS, etc.

  17. vikram bhatla on 19 Jul 2011

    Hi Nate,

    Awesome Implementation. I am loving it. I have converted merapi project into Transmission project and it just took me few mins to do it.
    It works like a gem.

    Thanks
    Vikram Bhatla


Leave your comment



Buy accutane online Michael kors handbags buy accutane online uk replica handbags Buy accutane cheap next handbags satchel handbags Damier Geant kardashian kollection Theme compat buy micardis david jones handbags adalat 30 mg designer replica replica handbags china handbags 2012 leather handbags Gucci Totes hq replica high quality replica handbags