Thanks. 


bsnyder wrote:
> 
> On Thu, Apr 24, 2008 at 7:00 PM, youhaodeyi <[EMAIL PROTECTED]> wrote:
>>
>>  How can I integrate ServiceMix into my application? This means I don't
>> need
>>  to start a ServiceMix server. I put it into Java Application.
> 
> Lot's of people embed ServiceMix inside of Java applications. ActiveMQ
> and ServiceMix were both designed to be embedded very easily. The
> following is an example of starting up ActiveMQ and ServiceMix using
> Java code:
> 
> // Configure an ActiveMQ broker on localhost:61616 and start it
> BrokerFactoryBean bfb = new BrokerFactoryBean(new
> ClassPathResource("path/to/activemq.xml"));
> bfb.afterPropertiesSet();
> BrokerService broker = bfb.getBroker();
> broker.start();
> 
> // Create and configure a ServiceMix container
> JBIContainer container = new JBIContainer();
> container.setEmbedded(true);
> container.setUseMBeanServer(false);
> container.setCreateMBeanServer(false);
> container.setCreateJmxConnector(false);
> container.setRootDir("path/to/root/dir");
> container.setMonitorInstallationDirectory(false);
> container.setNamingContext(new InitialContext());
> container.setTransactionManager(new GeronimoPlatformTransactionManager());
> ...
> container.init();
> container.start();
> 
> This example is very basic and is meant to just get you started. Also,
> this is just one example of how to achieve this. There are many, many
> other possibilities.
> 
> Bruce
> -- 
> perl -e 'print
> unpack("u30","D0G)[EMAIL PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
> 
> Apache ActiveMQ - http://activemq.org/
> Apache Camel - http://activemq.org/camel/
> Apache ServiceMix - http://servicemix.org/
> Apache Geronimo - http://geronimo.apache.org/
> 
> Blog: http://bruceblog.org/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-can-I-integrate-ServiceMix-into-my-application--tp16872530p16891064.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to