/**
* Create blazeds destination at runtime. Follow SVN link to java source files for more details.
* @name hint="Destination name"
*/
function createDestination(destname,channelId){
var local = structNew();
//svn: http://opensource.adobe.com/svn/opensource/blazeds/trunk/modules/core/src/flex/messaging/MessageBroker.java
local.brokerClass = createObject('java','flex.messaging.MessageBroker');
local.broker = local.brokerClass.getMessageBroker( javacast('null','') );
local.service = local.broker.getService('message-service');
local.destinations = local.service.getDestinations();
//check if destination already exists. If it does just return it
if (structKeyExists(local.destinations,arguments.destname)){ //check if destination already exist
return local.destinations[arguments.destname];
}
//svn: http://opensource.adobe.com/svn/opensource/blazeds/trunk/modules/core/src/flex/messaging/Destination.java
local.destination = local.service.createDestination(arguments.destname);
// Creates a ServiceAdapter instance and sets its id, sets if destination is manageable
local.destination.createAdapter('cfgateway');
//svn: http://opensource.adobe.com/svn/opensource/blazeds/trunk/modules/common/src/flex/messaging/config/ConfigMap.java
local.configMap = createObject('java','flex.messaging.config.ConfigMap').init();
local.configMap.addProperty('gatewayid',application.CFEventGatewayId);
//svn: http://opensource.adobe.com/svn/opensource/blazeds/trunk/modules/core/src/flex/messaging/config/ServerSettings.java
local.ss = createObject("java","flex.messaging.config.ServerSettings");
local.ss.setAllowSubtopics(true);
local.ss.setSubtopicSeparator('.');
local.ss.setDurable(false);
local.destination.setServerSettings(ss);
local.adapter = local.destination.getAdapter();
//Initializes the adapter with the properties.
local.adapter.initialize('cfgateway',configMap);
local.destination.addChannel(arguments.channelId);
//Starts the destination if its associated Service is started and if the destination is not already running.
local.destination.start();
return local.destination;
}
Manager asks “but what if we only have crap developers”, default response is “well, in that situation, standard best practice is to fail”
March 16, 2010
BlazeDS: Creating destinations at runtime
Because it is already said a lot on this subject, I won't waste much words, but go straight to the point/code.
March 7, 2010
Deploy ColdFusion 8/9 on Glassfish v3
Deploying ColdFusion 8/9 on Sun Glassfish 3 is not much different than it is on IBM WebSphere 7 AS. Except, imho, it is far more optimal, because it takes much less resources (especially if it is setup for dev) and cost nothing. I did this on Win7 platform, but it looks completely the same on Linux platforms. So, let's move.
March 4, 2010
Proud to be second!
Not that I wouldn't like to be a first, but last 2 second places were awesome!
On 29th January I won second place on "Best Of CF9" contest. Contest was organized by Ray and other Adobe Community Experts. Thank you for that. I won't talk about much about that here, just to emphize that I have "big" plans for Collyba. "Big" actually means that I'm really going to continue development on it, which is, for itself, enormous accomplishment:)
On 29th January I won second place on "Best Of CF9" contest. Contest was organized by Ray and other Adobe Community Experts. Thank you for that. I won't talk about much about that here, just to emphize that I have "big" plans for Collyba. "Big" actually means that I'm really going to continue development on it, which is, for itself, enormous accomplishment:)
February 17, 2010
What is MVC in few simple words
Today I read an excellent post on FW/1 mailing list. My impression came from ideal I try to follow in my life: "perfection lies in simplicity". I was, several times in situation to try to explain people what MVC (framework) is, and discovered that unexperienced developers have a problem to chew up that subject. One more thing I am sure about is that usually it is a problem with how things are presented more then to whom they are presented. However, this man, Ryan Cogswell, did it in 5 simple sentences. So, for everyone who are still not clear what MVC framework is and how it works, and for me who will use his words to explain others, I'll quote:
January 9, 2010
Everything is dead these days
As a ColdFusion developer most noticeable to me was spree of articles & blogs which tried to explain how CF is dead (or is about to die). But that's something I used to. Each time new CF Server comes out, "CF-is-dead wave" hit the coast. What really surprised me was that everything else died.
Few days ago, I read an "old" (for some reason it became popular again) article how UML died and 13 reasons why is so. According to author, this technology is already dead. After reading it, my only question was: What is an alternative? Read a blog, read dozens of comments and no one suggested what can be an alternative to this.
Subscribe to:
Posts (Atom)