[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xmlblaster] Embedding xmlBlaster into Apache Avalon Phoenix



Hi All,
I'm trying to port an avalon phoenix component which is currently using an embedded JMS server to xmlblaster. and I ran into some problem. I would like to have other blocks within same jvm as xmlBlaster get a connection to xmlblaster using a look up service. Here is what the for my previous application looks like :

Here I create an embedded jms server
public void initialize() throws Exception
{
m_server = new MessageServer(m_serverProperties);


this.m_initialized = true;
}


when a client needs a connection using a service selector, it gets whatever is returned by this method

public TopicConnectionFactory getTopicConnectionFactory()
{
TopicConnectionFactory connectionFactory = new PipeConnectionFactory(this.m_server);


return connectionFactory;
}


Here is what I did for xmlblaster, I copied this from some example in the test directory in xmlblaster

public void initialize() throws Exception
{
if (this.startEmbedded) {
glob.init(Util.getOtherServerPorts(serverPort)); // I'm not sure
String[] args = {}; // what this
glob.init(args); // 3 lines actually does tried reading the api but got lost somewhere

serverThread = EmbeddedXmlBlaster.startXmlBlaster(glob);
}


Now I would like to have other components running in the same jvm get a connection to the serverThread via a factory. I hope I made some sense with this.