Information Technology Reference
In-Depth Information
import javax.jms.∗;
import com.paul.∗;
service Subscribe {
protocol :sub{
options {
initialContextFactory =
"org.apache.activemq.jndi.ActiveMQInitialContextFactory" ;
topic = "REMOTEJ.SEND" ;
durable = true;
subscriber = "com.paul.PAUL" ;
clientID = "sub" ;
servers = "tcp://localhost:61616" ;
}
pointcut String Subscriber.subscribe() {
recovery = nextServer;
}
}
protocol : pub {
options {
initialContextFactory =
"org.apache.activemq.jndi.ActiveMQInitialContextFactory" ;
topic = "REMOTEJ.SEND" ;
servers = "tcp://localhost:61616" ;
}
pointcut void Publisher.publish(String) {
recovery = nextServer;
}
}
}
Figure 6.4. DDL for the publish/subscribe testing application.
We define a DDL with both the pub and sub protocols in the
same file. Upon compilation, both protocols are applied to their
matching pointcuts.
strated that the RemoteJ and DDL concepts can be used for both synchronous
tightly-coupled distributed systems as well as loosely-coupled asynchronous ones.
6.3 Evaluating Distributed Application Development in RemoteJ
This section evaluates the RemoteJ compiler/generator and DDL by converting
a number of applications into distributed applications, using the framework ap-
Search WWH ::




Custom Search