Home

Archives

Entries for month: October 2008

Oct 23 My 360|Flex Session Is Online

Thanks to Ted for getting these posted up.  I had almost forgotten about these:

Posted by: Andrew Powell

Categories: LiveCycle ES , Java , Flex , Conferences , BlazeDS , Spring , Adobe , Universal Mind , Hibernate , MOM , WebNext , Speaking 1 comment

Oct 22 Speaking At FlexCamp Boston

I just got word yesterday that I will be speaking at Flex Camp Boston on December 12th.  Brian Rinaldi does a great job putting this show on and deserves all the credit for the success it has become.  The agenda looks like it's going to be yet another good show.  A lot of quality speakers from Adobe and various other consulting firms, as well as Brightcove.  Come for the day, it's the best deal on a Flex show you can get.  

I will speaking on, and demonstrating, the Merapi framework.  I promise, I'll bring all my nifty samples like GPS, RFID, and maybe something new....

 

Posted by: Andrew Powell

Categories: Merapi , Java , FlexCamp , Flex , Conferences , BlazeDS , Spring , Adobe , Universal Mind , MOM , WebNext , Speaking 0 comments

Oct 14 Remoting From Java To ColdFusion By Example

This week, I've gotten the chance to work on a pretty slick proof-of-concept for a client. It's always cool to have a little bit of R&D time to play with some ideas. One of the requirements was that we send data as compactly as possible in order to minimize the bandwidth used from client to server over a low-bandwidth connection. Well, if we're trying to be efficient, the most efficient protocol I know is AMF. A few months ago (July 2008), Adobe announced the Java AMF Client as a part of BlazeDS. What this nifty client does is allow you to make AMF remoting calls from Java to any AMF endpoint including, but not limited to: BlazeDS, LCDS, and ColdFusion. Since we were working with a Java client talking to ColdFusion, this seemed, to me, to be the best and most efficient solution for moving data over low-bandwidth connections. Tom Jordahl has blogged about this a little bit, but has not, as yet, posted a complete sample for talking to ColdFusion over AMF from Java. Here is such an implementation for your digestion:

package com.universalmind.util;
   import flex.messaging.io.amf.client.AMFConnection;
   import flex.messaging.io.amf.client.exceptions.ClientStatusException;
   import flex.messaging.io.amf.client.exceptions.ServerStatusException;
   import flex.messaging.messages.RemotingMessage;
   /**
    * @author Andrew Powell
    */
   public class ColdFusionAMFSender {
    /**
    *
    * @param args the arguments, in order required, to pass into the CFC method
    * @return the value returned from the CFC
    * @throws ClientStatusException
    * @throws ServerStatusException
    */
    public Object sendAMFMessage(Object[] args) throws ClientStatusException, ServerStatusException {
    // Create the AMF connection.
    AMFConnection amfConnection = new AMFConnection();
    // Connect to the remote url.
    String url = "http://{yourservername}:{yourport}/{yourcontextroot}/flex2gateway";
    try
    {
    amfConnection.connect(url);
    }
    catch (ClientStatusException cse)
    {
    System.out.println(cse);
    return null;
    }
    String sourceName = "full.path.to.your.CFC";
    RemotingMessage message = new RemotingMessage();
    message.setMessageId(flex.messaging.util.UUIDUtils.createUUID());
    message.setOperation("remoteMethodName");
    message.setBody(args);
    message.setSource(sourceName);
    message.setDestination("ColdFusion");
    return amfConnection.call(null, message);
    }

   }

Posted by: Andrew Powell

Categories: Java , ColdFusion , BlazeDS , Adobe , Universal Mind , MOM 2 comments