Access Keys:
Skip to content (Access Key - 0)

Basic Usage

Skip to end of metadata
Go to start of metadata
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Basic Usage

This page describes the basics of using iBeans. For information on downloading additional iBeans, see Managing iBeans.

Each iBean is exposed as an annotation (a simple metadata tag you insert in the code) and an API. You can use either annotations or APIs in your Java code depending on personal preference. If you are working with a JSP or other technology that does not support annotations, use the APIs.

For example, to add a send action to a method called hello, you could insert the annotation before the method like this:

@Send(uri = "smtp://ross@password?to=myfriend@mulesource.com")
   public String hello(String name)
   {
...

Or you could call the send method from the iBeans context by adding the following line to the end of the method definition:

...
ibeans.send("smtp://ross@password?to=myfriend@mulesource.com")

You can use multiple iBeans annotations on a method. For example, when a method is called, you might want to receive messages from one channel, process the messages, and send the results to another channel:

Galaxy configuration integration will be implemented in a future release
@Receive(uri = "vm://test")
@Send(config="galaxy:/myApp/myJms")
public String processXml(String xml)
{
    //Do something
    return xml;
}

You are now ready to get started using iBeans. The following topics will be especially helpful for getting started:

Adaptavist Theme Builder (4.2.2) Powered by Atlassian Confluence 3.4.7, the Enterprise Wiki