Navigation

RSS 2.0 New Entries Syndication Feed Atom 0.3 New Entries Syndication Feed

Show blog menu v

 

General

Use it

Documentation

Support

Sibling projects

RIFE powered

Valid XHTML 1.0 Transitional

Valid CSS!

Blogs : Archives

< PhotoBlox: the typical application where Laszlo excels   Bla-bla: Ta-da in Java (and Laszlo and RIFE) >
RIFE 1.0rc1 released

This has mainly been a release with bug-fixes and minor convenience changes.

Thanks to the great feedback we've received from users on the previous release, we're confident that the 1.0 mark has almost been reached. Since there were still a couple of new features added, we're first releasing this interim release candidate.

Below are the highlights of this release.

  • full declaration of elements in the site structure [ more ]
  • new asynchronous mail queue [ more ]

You can also read the full changelog for more details.


Full declaration of elements in the site structure

In prior versions you were forced to declare each element in a separate file if you chose to use XML for the definition of your site structure.

The XML site structure now supports all the element declaration statements in-line. So if it doesn't make sense for you to have re-usable declarations, you can just centralize everything in one file.

For example, this is the new Hello World site structure:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE site SYSTEM "/dtd/site.dtd">
<site>
    <element id="HELLOWORLD" implementation="tutorial.helloworld.HelloWorld" url="/home"/>
</site>

[ top ]

New asynchronous mail queue

We've extracted the mail queue from our Bamboo forums project and ported it to all the databases that RIFE supports.

This allows you to create mails with simple POJOs and just put them into the queue. At regular intervals, the queue will process them and send them. To be able to use the mail queue, you need to have the javamail and activation jars in your classpath.

The queue is stored in a database and you install the structure as follows:

DatabaseMailQueueFactory.getInstance(datasource).install();

To make the queue run at regular intervals, you have to activate the RIFE's scheduler. It's the easiest to use the in-memory scheduler. You do this by adding the following line to your participants.xml file:

<participant param="rep/scheduler.xml">ParticipantMemoryScheduler</participant>

The rep/scheduler.xml configuration file looks like this if you only have the mail queue task registered:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE scheduler SYSTEM "/dtd/scheduler.dtd">
<scheduler>
    <task classname="com.uwyn.rife.mail.executors.DatabaseMailQueueExecutor" frequency="*/3 * * * *">
        <option name="datasource">postgresql</option>
        <option name="smtp_server">localhost</option>
    </task>
</scheduler>

The format of the frequency attribute is the same as the cron format. The datasource and smtp_server options allow you to configure the mail queue task. If you omit smtp_server, mail will not be sent for real but written to the logging output instead.

To send a mail all you have to do is this, for example:

DatabaseMailQueueFactory.getInstance(datasource).queue(new Email()
    .to("customer@theircompany.com")
    .from("info@yourcompany.com")
    .cc("billing@yourcompany.com")
    .bcc("themanager@yourcompany.com")
    .subject("this is the subject")
    .body("and the body of the mail"));

[ top ]

posted by Geert Bevin in RIFE on Mar 16, 2005 7:28 PM : 0 comments [permalink]
 

Comments

Add a new comment

Comments on this blog entry have been closed.

< PhotoBlox: the typical application where Laszlo excels   Bla-bla: Ta-da in Java (and Laszlo and RIFE) >
 
 
 
Google
rifers.org web