Sep 27
By using Prana to create an application context for your Remoting enabled application, you want to achieve two things for maximum flexibility:
- don't compile against services-config.xml
- don't specify destinations on the client
It was with the second goal that I ran into a little issue lately when I was creating an application context for a project that uses BlazeDS. Untill now, I had mostly been using WebORB .Net for Remoting with Flex/AIR and the nice thing is that it offers you a GenericDestination. (AMFPHP offers that too btw) That way, for simple destinations, you don't actually have to specify any destinations in remoting-config.xml. When configuring remote objects on the client, you can set the "destination" property to "GenericDestination" and specify the "source" property. The "source" property then refers to the fully qualified classname of the service you want to invoke.
Here's an example:
XML:
-
<object id="myRemoteObject" class="mx.rpc.remoting.mxml.RemoteObject">
-
<property name="destination" value="GenericDestination"/>
-
<property name="endpoint" value="http://localhost/project/weborb.aspx"/>
-
<property name="source" value="com.domain.project.SomeService"/>
-
</object>
It might be interesting to note that there must be a "GenericDestination" defined on the server. So in remoting-config.xml, you would see a destination defined as:
XML:
-
<destination id="GenericDestination">
-
<properties>
-
<source>*</source>
-
</properties>
-
</destination>
Opposed to a concrete defined destination like:
XML:
-
<destination id="myDestination">
-
<properties>
-
<source>com.domain.project.SomeService</source>
-
</properties>
-
</destination>
The wildcard (*) character is replaced at runtime with the value you specify in the "source" property of the remote object.
Switching to BlazeDS however, there is no GenericDestination available. Hm, ok then let's add one. So, I copy the GenericDestination from my WebORB remoting-config.xml to my BlazeDS remoting-config.xml, change my remote objects to specify the GenericDestination and add the source attribute:
XML:
-
<object id="myRemoteObject" class="mx.rpc.remoting.mxml.RemoteObject">
-
<property name="destination" value="GenericDestination"/>
-
<property name="endpoint" value="http://localhost:8400/project/messagebroker/amf"/>
-
<property name="source" value="com.domain.project.SomeService"/>
-
</object>
BlazeDS will be smart enough to support this...I hope...nope! A ClassNotFoundException is thrown. Apparently BlazeDS is looking for a class named "*" and is unable to handle this.
I might have a look at the BlazeDS sources and try to figure out how this functionality could be added. Or has anyone allready done this, or knows a workaround?
Add to Bloglines -
Digg This! -
del.icio.us -
Stumble It! -
Twit This! -
Technorati links -
Share on Facebook -
Feedburner
Aug 25
Note: Just a short post to save your hair from turning gray (I know mine just did)
If you ever run into a "Unable to access UserTransaction in DataService" error when working with LCDS on Tomcat 5.5.x+, make sure you configured the Java Open Transaction Manager (JOTM) correctly. You can do this by adding the following in a project config file (WEB_INF/context.xml or a file named [MY_PROJECT].xml in [TOMCAT_HOME]/conf/Catalina/localhost):
XML:
-
<Context reloadable="true">
-
<Transaction factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/>
-
</Context>
Now if only the Flex Project Wizard would do this for us...
Add to Bloglines -
Digg This! -
del.icio.us -
Stumble It! -
Twit This! -
Technorati links -
Share on Facebook -
Feedburner
Aug 05
In the last months there have been several blog posts about the evil that is Cairngorm. People are complaining about the framework on mailing lists and on forums and when talking to other developers, a lot of them seem to dislike Cairngorm, mostly in favor of other frameworks. Some projects I consulted on (often too late) were actually being refactored/rewritten to move away from Cairngorm.
I noticed however that the opinions often lacked strong arguments, if any at all, that were convincable enough for me to truly dig into other frameworks. In some cases, I felt that the choice of a framework was based on a hype and prejudgement towards other frameworks. In particular PureMVC is getting a lot of attention and I can't remember how many developers I have heard saying that they were using PureMVC just because "Cairngorm sucks".
Don't get me wrong. I certainly don't want to start a religious war between the Cairngorm, PureMVC and other framework followers. I'm all for a little "competition" because I believe it drives innovation. We're even offering extensions to both frameworks in Prana and since people are using them, there certainly will be good reasons that justify the use of one of the two frameworks.
However, I was wondering what your opinion was on Cairngorm. What in particular is it that you don't like about Cairngorm and if you could change things, what would they be? On the other hand, what things do you absolutely like about the framework?
Add to Bloglines -
Digg This! -
del.icio.us -
Stumble It! -
Twit This! -
Technorati links -
Share on Facebook -
Feedburner
Jul 22
In order to better serve the growing demand for Flex and AIR expertise, we at Boulevart have launched a new office dedicated to the development of cutting edge Rich Internet Applications. Whether you have a new project going on or need consultancy to help you out with running projects, we are here for you. Our team consists of highly skilled and experienced analysts and developers with a background in various other technologies. We are also involved in open-source projects, provide unlimited input to the communities around them and ride the waves on the edge of Flash technology.
For more info please contact christophe.herreman [at] boulevart.be or visit http://www.boulevart.be
The new office is located at:
Molenaarsstraat 111 b3
9000 Gent, Belgium
Grotere kaart weergeven
Add to Bloglines -
Digg This! -
del.icio.us -
Stumble It! -
Twit This! -
Technorati links -
Share on Facebook -
Feedburner
Recent Comments