Tuesday, October 4, 2016

Build MSF4J with WSO2 Carbon Kernel 5.1.0

MSF4J supports standalone mode as well as the OSGi mode. Unlike other WSO2 products, MSF4J is not released as a typical server. But you can build up your own server by installing the MSF4J feature in to the Carbon Kernel.
You can used the pom based approach to install the MSF4J feature into the Kernel 5.1.0

Steps

Copy the following pom.xml and carbon.product file to a some directory
Run “mvn clean install” inside the directory.
If the build is success, you can find the build product inside the target folder. You can run the server by executing the wso2carbon-kernel-5.1.0/bin/carbon.sh file in the target directory.

Add a Microservice to the Server

You can build the stockquote bundle sample as mentioned inhttps://github.com/wso2/msf4j/tree/master/samples/stockquote/bundleThen copy the bundle to wso2carbon-kernel-5.1.0/osgi/dropins directory and start the server.
To invoke the deployed service use below curl command
curl http://localhost:9090/stockquote/IBM

1 comment:

  1. Can you make a tutorial how can we config Spring in jar file that deploy to deployment/microservices folder in msf4j, such as inject bean, autowire datasource, entitymanager...

    ReplyDelete