Unable to access UserTransaction in DataService

Flex, Java, tips 'n tricks 1 Comment »

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:
  1. <Context reloadable="true">
  2.   <Transaction factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/>
  3. </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
 

What is bothering you about Cairngorm?

ActionScript, Cairngorm, Flex 16 Comments »

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
 

Boulevart launches new office for Flex and AIR development

ActionScript, Air, Boulevart, Flex 4 Comments »

BoulevartIn 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
 

Prana Framework 0.6 Released

ActionScript, Flex, Prana 7 Comments »

I'm pleased to announce that the Prana Framework 0.6 release is now available.

Prana

Download | API Documentation | Changelog

In this release the following remarkable changes and additions have been made:

  • the IoC container is now ActionScript 3 compatible
  • command factories for Cairngorm's FrontController
  • more PureMVC experimenting

ActionScript 3 compatibility

We got lots of reactions from people who wanted to use Prana in ActionScript projects but couldn't because Prana relied heavily on some Flex framework specific classes. Well, we have now resolved this issue by completely refactoring the IoC container and parser so that all Flex dependencies are removed. As a result we now have 2 different application context implementations. The first one is the standard XMLApplicationContext which is aimed to be ActionScript 3 compatible. The second one is the FlexXMLApplicationContext which actually extends the XMLApplicationContext and adds support for Flex specific classes like ArrayCollection. The application context and the XML parsers are now configurable with XML node parsers and reference resolvers so it would theoretically be possible now to extend the XML dialect with your own tags and have them parsed by the application context.

Command Factories for Cairngorm's FrontController

In order to reach maximum flexibility in setting up commands and business delegates, we have introduced the option to create custom command factories that plug into Cairngorm's FrontController. The FrontController actually allready acts as a command factory since it takes an event name, looks up its corresponding command and instantiates that command. We have abstracted that behavior so that it is now possible to write a custom implementation of a command factory and register it with the FrontController. This is very handy when you want commands to handle different implementations of business delegates without the need to instantiate a business delegate directly in a command, making it hard to test and change.

What follows is an example of a command that is configured with a business delegate at runtime via the IoC container.

Actionscript:
  1. public class AuthenticateUserCommand extends AbstractResponderCommand {
  2.   override public function execute(event:CairngormEvent):void {
  3.     super.execute(event);
  4.     var e:AuthenticateUserEvent = event as AuthenticateUserEvent;
  5.     IUserDelegate(businessDelegate).authenticate(e.username, e.password);
  6.   }
  7. }

XML:
  1. <object id="frontController" class=“org.pranaframework.cairngorm.control.CairngormFrontController">
  2.   <method-invocation name="addCommandFactory">
  3.     <arg>
  4.       <object id="userDelegateFactory" class="org.pranaframework.cairngorm.business.BusinessDelegateFactory">
  5.         <property name="delegateClass" value="com.domain.business.UserRemoteObjectDelegate" type="Class" />
  6.         <property name="service" ref="userService"></property>
  7.       </object>
  8.     </arg>
  9.     <arg>
  10.       <array>
  11.         <value type="Class">com.domain.commands.AuthenticateUserCommand</value>
  12.         <value type="Class">com.domain.commands.AuthenticateSSOUserCommand</value>
  13.       </array>
  14.     </arg>
  15.   </method-invocation>
  16. </object>

Notice that we are registering the command factory with the FrontController via the "method-invocation" element. This is a new XML element that was introduced this release and that is actually preprocessed to a MethodInvokingFactoryObject.

Further, we are configuring the FrontController with a BusinessDelegateFactory which is available in the Prana Cairngorm extensions. We need to specify a name of the business delegate class we want the factory to create and also pass in a reference to the appropriate service. We also need to make clear to the FrontController what commands need to be created via this factory. As you can see we added 2 types of commands, a AuthenticateUserCommand and a AuthenticateSSOUserCommand.

When the FrontController receives an event, it will look up the corresponding command (just like it works in Cairngorm), but instead of creating a command via its class name on the fly, the controller will lookup the command factory it needs to use and then use that factory to create the command. In the example, a command will be created and a business delegate will be injected.

More PureMVC Experimenting

The Prana-PureMVC team has been playing around with some new ideas around better integration between the two frameworks. Some of the key changes and improvements are:

  • changes in internal implementation which are not so much visible from the end user standpoint, but can potentially have some impact on wider prana/puremvc acceptance
  • new feature which enables significant reduction of name constants during registration, retrieval and removal of puremvc elements (proxies, mediators and commands)
  • new feature which enables additional and different startup idiom with which prana can be initialized late instead of up front as it had to be before

For a full and in depth discussion on these changes, please see the text file at "prana-sample-anotherArch101Demo/resources/docs/pranaPureMvcIntegration-FurtherDevelopment.txt".

Conclusion

We hope you enjoy this release and we are always interested to hear from you. So if you have any comments or suggestions, be sure to join our forum at http://prana.herrodius.com.

Hope you enjoy this release and have fun coding.


Add to Bloglines - Digg This! - del.icio.us - Stumble It! - Twit This! - Technorati links - Share on Facebook - Feedburner
 

2M08: Aral Balkan

Conferences No Comments »

[10.32] Aral is about to start. My laptop is running out of juice, so we'll see how far we get.

"Ruling the Web"

He brought a flying pig or so. He needs 12 volunteers. The Belgian crowd is frozen to their seats. I can't go of course, I need to blog ;-) He handing out post-it notes. He wants people to write down interesting things and paste the notes on the walls.

He shot his flying pig into the audience.

Showing FutureSplash Animator.

Snakes on a plane, hehehe. angryalien.com

32 Things every flasher should know. Flash Gordon FTW!

"Flash is 99% bad", Mr. Nielsen or was it the lama.

Skip intro, Flashturbation is bad.

[10.43] Going through the 32 things. Talks about the evolution of the ActionScript language.

My battery is about to die. Sorry guys.


Add to Bloglines - Digg This! - del.icio.us - Stumble It! - Twit This! - Technorati links - Share on Facebook - Feedburner
 
WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Login