Java Virtal Machine.net

[ News ] rss

February 01, 2011

Mark Wielaard: New GPG key. Finally created a new GPG key using gnupg. The old one was a DSA/1024 bits one and 8 years old. The new one is a RSA/2048 bits one. I will use the new one in the future to sign any release tarballs I might create. pub 2048R/57816A6A 2011-01-29 Key f...

More »

February 01, 2011

Andrew Hughes: [SECURITY] IcedTea6 1.7.8, 1.8.5, 1.9.5 Released!. We are pleased to announce a new set of security releases, IcedTea6 1.7.8, IcedTea6 1.8.5 and IcedTea6 1.9.5. This update contains the following security updates: The IcedTea project provides a harness to build the source code from OpenJDK6 u...

More »

April/2024
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
2122232425 2627
282930    

[ Archives News
for 'Java Technology' ]

home > news > java technology > tweet magnolia tweet

Tweet Magnolia Tweet

Originally, I wanted to write about Magnolia-Twitter integration, but at some point I've realized such integration is so simple that there's no point writing about it. So instead, let's look how you can write custom commands for Magnolia. Anybody who seriously developed on Magnolia for while had to write a Command sooner or later. They are incredibly simple, yet very powerful. Part of it is that you can use commands just anywhere - call them from the context Menu in AdminCentral, invoke them from Groovy or BSH console, call them inside of the workflow, kick start them based on Observation and changes in repository or call them periodically via scheduler. The whole logic of commands and their execution is based on Apache commons-chain. But you don't need to worry about that at all. The only things you need to know are: Create your command by extending MgnlCommand or one of its subclasses. Command instances are pooled and reused so you can do heavy initialization in constructor and be sure that it will be called just once per instance of command. Any single instance of command is guarantied to be called by one thread only at any given time. Since the commands are pooled and reused, it is important for custom commands to release all unnecessary resources in the release() method to prevent allocation of unnecessary memory, but more importantly to make sure status possibly held by the command instanc...


Date: February, 22 2010
Url: http://www.java.net/blog/rah003/archive/2010/02/21/tweet-magnolia-tweet


Others News

©2002-2019Java-Virtual-Machine.net website maker | website designer | bootstrap forms | easyhtml5video.com | html slider