Archive for September, 2009
Adobe Max online
Posted by cornel | Filed under Events, Uncategorized
As most of you know there is no Adobe Max in Europe this year. For the ones not able to go to Los Angeles you can register on Adobe Max online – the keynotes are going to be streamed live. You can also view the top session of the day from each track: Design, Develop, and Envision.
Tomcat and common loader
Posted by cornel | Filed under LCDS/Blaze DS
I spent twenty minutes last night trying to understand why the Tomcat delivered with the Livecycle Data Services installation works fine when the libraries for jotm are located in a subfolder of the common/lib. When I’ve installed a clean version of Tomcat and I copied the folder jotm into common/lib the classloader was not able to find them, and I did not had any explanation.
Finally I discovered that there is a parameter in catalina.properties denoted common.loader. By default the value is ${catalina.home}/lib,${catalina.home}/lib/*.jar, however in the first case it is ${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.home}/lib/activemq4.1.1/*.jar,${catalina.home}/lib/jotm2.0.10/*.jar,${catalina.home}/lib/lcds/*.jar . This parameter specifies all the paths for the common class loader.
BlazeDS, AMF and read only properties
Posted by cornel | Filed under Java, LCDS/Blaze DS
A common scenario when building domain objects is to have read only objects properties. The serialization algorithm from BlazeDS/LCDS does not know how to serialize the read only properties – it needs both get and set methods (with one exception – the java.lang.Throwable class). So you have two options in this scenario if you do not want to build adapters over your domain object:
a)Build your own serialization/deserialization mechanism
In order to do that you need to implement the java.lang.Externalizable interface for the Java classes and flash.utils.IExternalizable for the ActionScript ones. The Java example is here and the AS here.
When using this approach you have the following advantages/disadvantages:
Advantages: the serialization/deserialization is much faster
Disadvantages: greater development time, and you lose some optimizations related to data compression (like string references and writing numbers in fewer bytes). Of course, you can build your own optimizations but again this means more development time
b)Patch the code from BlazeDS. You either add the includeReadOnly = true line in the BeanProxy constructor (this flag is used for Throwable serialization), or, better yet, take the modifications from the current BlazeDS branch where this feature was implemented.
Flex and Java next week in Italy
Posted by cornel | Filed under Events
Next week I’ll visit several Java User Groups in Italy speaking about Flex and Java:
22 Genova
24 Milano
Looking forward to meet you.
Adobe to acquire Omniture
Posted by cornel | Filed under Events
Adobe announced today that it will acquire Omniture (the largest web analytic software company) for about $1.8 billion. It’s the second largest acquisition for Adobe after Macromedia (3.4 billion).
Job openings on Livecycle Data Services team
Posted by cornel | Filed under Events, LCDS/Blaze DS
The Livecycle Data Services team has three openings: computer scientist, senior computer scientist and principal computer scientist. If you want to work on a really cuttting edge product for a world class company and you have the required knowledge/passion I encourage you to apply. You will have the chance to work with sharp people, and you can’t find that everywhere.
Logging everything in BlazeDS
Posted by cornel | Filed under Uncategorized
When you create a Flex/Java project in Flex Builder the logging tag in the services-config.xml file looks like that:
<logging> <target class="flex.messaging.log.ConsoleTarget" level="Error"> <properties> <prefix>[BlazeDS] </prefix> <includeDate>false</includeDate> <includeTime>false</includeTime> <includeLevel>false</includeLevel> <includeCategory>false</includeCategory> </properties> <filters> <pattern>Endpoint.*</pattern> <pattern>Service.*</pattern> <pattern>Configuration</pattern> </filters> </target> </logging>
Unfortunately you can lose some important error messages with this <filters> configuration. That’s why its better to edit the file after creating the project and change the filters section to *
<filters> <pattern>*</pattern> </filters>
Logging in BlazeDS and LCDS with Java Util
Posted by cornel | Filed under Java, LCDS/Blaze DS, Uncategorized
I created a small class to allow integration between the logging mechanism from BlazeDS and java.util.logging. As an example it’s useful if you plan to use BlazeDS or Livecycle Data Services inside Google App Engine – the former one uses java.util.logging.
In order to use it you should modify services-config.xml to use the newly created class (I created my class in the package flex.messaging.log):
<target class=”flex.messaging.log.JavaUtilLogTarget” level=”Debug”>
The source code is below:
import java.util.logging.Level; public class JavaUtilLogTarget extends AbstractTarget{ public void logEvent(LogEvent event) { java.util.logging.Logger log = java.util.logging.Logger.getLogger(event.logger.getCategory()); Level level; if (event.level >= LogEvent.ERROR) level = Level.SEVERE; else if (event.level >= LogEvent.WARN) level = Level.WARNING; else if (event.level >= LogEvent.INFO) level = Level.INFO; else if (event.level >= LogEvent.DEBUG) level = Level.FINE; else level = Level.FINEST; log.log(level,event.message,event.throwable); } }
FlexPMD
Posted by cornel | Filed under Events, Flex
Yesterday Adobe Technical Services launched FlexPMD – a tool to audit ActionScript source code and detect common problems (anti patterns, unused code, badly written Flex components ). The tool started as an internal project in Adobe and now it has been made open source.
I can say that using this tool is a must for any complex Flex projects, because it enables you to detect common problems at an early phase. For the moment it can be invoked from Maven/Ant and Mac OS X automator, in the future it will probaby also be available as a Flash Builder plugin.