You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by kumar k <ku...@yahoo.com> on 2007/08/29 13:45:24 UTC

How to embed ServiceMix

What are the steps required for  embeding  ServiceMix in my application? 
       
---------------------------------
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.

Re: How to embed ServiceMix

Posted by Ivanhoe Abrahams <iv...@gmail.com>.
Yes,

Dependent jars simply get dropped in WEB-INF/lib
Remember that as you add Binding Components, you will have to add more jars,

Also have a look at http://incubator.apache.org/servicemix/embedding.html

Ivanhoe



On 8/29/07, kumar k <ku...@yahoo.com> wrote:
>
> So all dependency jars need to go in WEB-INF/lib?
>
> Ivanhoe Abrahams <iv...@gmail.com> wrote:  Hi,
>
> Maybe somebody else can give you a better indication as how to do this,
> but
> here's how I would do it. ASSUMING that your'e web app is Spring enabled.
>
> Change your web.xml to include
>
>
>
> contextConfigLocation
>
>
> /WEB-INF/servicemix.xml
>
>
>
>
> contextClass
>
>
> org.apache.xbean.spring.context.XmlWebApplicationContext
>
>
>
>
>
>
> org.springframework.web.context.ContextLoaderListener
>
>
>
> This will cause the servicemix.xml file to load. and as a result your
> servicemix JBIContainer, along with other spring based beans....
>
> That's it
>
> Remember that as you add more Binding Components eg http, you will have to
> progressively add more jars to your project, at the very least I think you
> only need 6 or 7 jar files, but as you add new BC's you need to add more
> jars (obviously)
>
> Hope that helps
> Ivanhoe
>
>
>
>
> On 8/29/07, kumar k wrote:
> >
> > What I wanted to ask is how to package it with my application. My
> > application is deployed as a war file. If I want to embed servicemix
> with it
> > what all jars etc need to be packaged with that war and what should be
> > package structure.
> > Regards
> > Kumar
> >
> > Kit Plummer wrote:
> > On 8/29/07, kumar k wrote:
> > >
> > > What are the steps required for embeding ServiceMix in my application?
> > >
> > > ---------------------------------
> > > Looking for a deal? Find great prices on flights and hotels with
> Yahoo!
> > > FareChase.
> >
> >
> > Sending you on a boondoggle:
> >
> > http://incubator.apache.org/servicemix/basic.html
> >
> > --
> > Kit Plummer
> > Nobody-in-Charge @ Black:Hole:Logic
> > http://www.blackholelogic.com
> >
> >
> >
> > ---------------------------------
> > Ready for the edge of your seat? Check out tonight's top picks on Yahoo!
> > TV.
>
>
>
> ---------------------------------
> Moody friends. Drama queens. Your life? Nope! - their life, your story.
> Play Sims Stories at Yahoo! Games.

Re: How to embed ServiceMix

Posted by kumar k <ku...@yahoo.com>.
So all dependency jars need to go in WEB-INF/lib? 

Ivanhoe Abrahams <iv...@gmail.com> wrote:  Hi,

Maybe somebody else can give you a better indication as how to do this, but
here's how I would do it. ASSUMING that your'e web app is Spring enabled.

Change your web.xml to include



contextConfigLocation


/WEB-INF/servicemix.xml




contextClass


org.apache.xbean.spring.context.XmlWebApplicationContext






org.springframework.web.context.ContextLoaderListener



This will cause the servicemix.xml file to load. and as a result your
servicemix JBIContainer, along with other spring based beans....

That's it

Remember that as you add more Binding Components eg http, you will have to
progressively add more jars to your project, at the very least I think you
only need 6 or 7 jar files, but as you add new BC's you need to add more
jars (obviously)

Hope that helps
Ivanhoe




On 8/29/07, kumar k wrote:
>
> What I wanted to ask is how to package it with my application. My
> application is deployed as a war file. If I want to embed servicemix with it
> what all jars etc need to be packaged with that war and what should be
> package structure.
> Regards
> Kumar
>
> Kit Plummer wrote:
> On 8/29/07, kumar k wrote:
> >
> > What are the steps required for embeding ServiceMix in my application?
> >
> > ---------------------------------
> > Looking for a deal? Find great prices on flights and hotels with Yahoo!
> > FareChase.
>
>
> Sending you on a boondoggle:
>
> http://incubator.apache.org/servicemix/basic.html
>
> --
> Kit Plummer
> Nobody-in-Charge @ Black:Hole:Logic
> http://www.blackholelogic.com
>
>
>
> ---------------------------------
> Ready for the edge of your seat? Check out tonight's top picks on Yahoo!
> TV.


       
---------------------------------
Moody friends. Drama queens. Your life? Nope! - their life, your story.
 Play Sims Stories at Yahoo! Games. 

Re: How to embed ServiceMix

Posted by Ivanhoe Abrahams <iv...@gmail.com>.
Hi,

Maybe somebody else can give you a better indication as how to do this, but
here's how I would do it. ASSUMING that your'e web app is Spring enabled.

Change your web.xml to include

   <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/servicemix.xml</param-value>
    </context-param>
    <context-param>
        <param-name>contextClass</param-name>
   <param-value>org.apache.xbean.spring.context.XmlWebApplicationContext
</param-value>
    </context-param>
    <listener>
<listener-class>org.springframework.web.context.ContextLoaderListener
</listener-class>
    </listener>

This will cause the servicemix.xml file to load. and as a result your
servicemix JBIContainer, along with other spring based beans....

That's it

Remember that as you add more Binding Components  eg http, you will have to
progressively add more jars to your project, at the very least I think you
only need 6 or 7 jar files, but as you add new BC's you need to add more
jars (obviously)

Hope that helps
Ivanhoe




On 8/29/07, kumar k <ku...@yahoo.com> wrote:
>
> What I wanted to ask is how to package it with my application. My
> application is deployed as a war file. If I want to embed servicemix with it
> what all jars etc need to be packaged with that war and what should be
> package structure.
>   Regards
>   Kumar
>
> Kit Plummer <ki...@gmail.com> wrote:
>   On 8/29/07, kumar k wrote:
> >
> > What are the steps required for embeding ServiceMix in my application?
> >
> > ---------------------------------
> > Looking for a deal? Find great prices on flights and hotels with Yahoo!
> > FareChase.
>
>
> Sending you on a boondoggle:
>
> http://incubator.apache.org/servicemix/basic.html
>
> --
> Kit Plummer
> Nobody-in-Charge @ Black:Hole:Logic
> http://www.blackholelogic.com
>
>
>
> ---------------------------------
> Ready for the edge of your seat? Check out tonight's top picks on Yahoo!
> TV.

Re: How to embed ServiceMix

Posted by kumar k <ku...@yahoo.com>.
What I wanted to ask is how to package it with my application. My application is deployed as a war file. If I want to embed servicemix with it what all jars etc need to be packaged with that war and what should be package structure.
  Regards
  Kumar

Kit Plummer <ki...@gmail.com> wrote:
  On 8/29/07, kumar k wrote:
>
> What are the steps required for embeding ServiceMix in my application?
>
> ---------------------------------
> Looking for a deal? Find great prices on flights and hotels with Yahoo!
> FareChase.


Sending you on a boondoggle:

http://incubator.apache.org/servicemix/basic.html

-- 
Kit Plummer
Nobody-in-Charge @ Black:Hole:Logic
http://www.blackholelogic.com


       
---------------------------------
Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. 

Re: How to embed ServiceMix

Posted by Kit Plummer <ki...@gmail.com>.
On 8/29/07, kumar k <ku...@yahoo.com> wrote:
>
> What are the steps required for  embeding  ServiceMix in my application?
>
> ---------------------------------
> Looking for a deal? Find great prices on flights and hotels with Yahoo!
> FareChase.


Sending you on a boondoggle:

http://incubator.apache.org/servicemix/basic.html

-- 
Kit Plummer
Nobody-in-Charge @ Black:Hole:Logic
http://www.blackholelogic.com

Re: How to embed ServiceMix

Posted by nvijayak <nv...@cs.indiana.edu>.
The steps to embed servicemix in Tomcat are as follows:

cd fuse-esb-3.3.0.6\examples\servicemix-web

mvn package

copy target\servicemix-web-3.3.0.6-fuse.war to tomcat\webapps

Start tomcat

You can see Servicemix is running by going to
http://localhost:8080/servicemix-web-3.3.0.6-fuse/examples. This is a simple
example that tests that Servicemix is running

The Servicemix JMX console can be viewed at
http://localhost:8080/servicemix-web-3.3.0.6-fuse

The list of applications deployed can be viewed at
http://localhost:8080/servicemix-web-3.3.0.6-fuse/jbi;

To deploy a jsr181 webservice application developed in Servicemix, 

First copy servicemix-shared components from fuse\hotdeploy to
tomcat\webapps\servicemix-web-3.3.0.6\deploy 
Then copy the servicemix-jsr181 components from fuse\hotdeploy folder to
tomcat\webapps\servicemix-web-3.3.0.6\deploy 
In the tomcat console, we can see that the components is being unzipped and
installed. The jmx console shows the status of the installation. 
(Please note that these components need to be installed only if they are not
already running. Check by looking at 'Component' in JMX console)   
Now copy the service-assembly.jar file from the corresponding directory in
fuse to tomcat\webapps\servicemix-web\deploy 

Servicemix can be embedded in Jetty. The steps are as follows:

>From the servicemix.war file created from mvn package in the
examples\servicemix-web folder, remove these jars: mx4j*.jar and
jetty-management-*.jar. These jars are used to start the MBeanServer and are
already part of Jetty. Deploying Servicemix with these jars will throw an
exception and halt the deployment. 


Jetty by default extracts the war files in the system temp folder (ex:
C:\Documents and Settings\username\Local Settings\Temp). If we copy the
deployable jars into the servicemix folder in the temp directory, this gets
deleted when jetty or system restarts. To avoid this first create a folder
called  work in Jetty_home. Then start Jetty. This expands the war files in
the work folder. The jars can then be copied to
Jetty_Home\work\Jetty_**_servicemix**\webapps\deploy



kumar k wrote:
> 
> What are the steps required for  embeding  ServiceMix in my application? 
>        
> ---------------------------------
> Looking for a deal? Find great prices on flights and hotels with Yahoo!
> FareChase.
> 

-- 
View this message in context: http://www.nabble.com/How-to-embed-ServiceMix-tp12385455s12049p15843002.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.