WildFly Swarm Initial Release
By Bob McWhirter | May 5, 2015
Happy Cinco De Mayo!
Crack open a cold adult beverage and start retooling your JavaEE skills towards microservices.
What is WildFly Swarm?
WildFly Swarm [1] is a new sidecar project supporting WildFly 9.x to enable deconstructing the WildFly AS and pasting just enough of it back together with your application to create a self-contained executable jar.
JAX-RS is a microservice?
In the simplest case, you make small adjustments to your existing Maven pom.xml that generates a WAR file and you’ll get another artifact with a name akin to myproject-1.0-swarm.jar.
Simply add the wildfly-swarm-plugin to your pom.xml:
<plugin> <groupId>org.wildfly.swarm</groupId> <artifactId>wildfly-swarm-plugin</artifactId> <version>${version.wildfly-swarm}</version> <executions> <execution> <phase>package</phase> <goals> <goal>create</goal> </goals> </execution> </executions> </plugin>
Add a <dependency> block or two:
<dependency> <groupId>org.wildfly.swarm</groupId> <artifactId>wildfly-swarm-jaxrs</artifactId> <version>${version.wildfly-swarm}</version> <scope>provided</scope> </dependency>
Build your project:
mvn package
And run that sucker:
java -jar ./target/myproject-1.0-swarm.jar
Can I get fancier?
You betcha!
Since WildFly Swarm is based upon WildFly 9.x, you have most of the power of WildFly available to you. This includes subsystems such as:
Undertow (Servlets)
JAX-RS
Naming/JNDI
Transactions
Messaging
Datasources
Logging
Weld (CDI)
JBoss MSC
Security
Additionally, if you want to provide your own main(…) method to instantiate the Container, configure some of the subsystems, and perform whatever deployments you need, that’s possible also!
public class Main { public static void main(String[] args) throws Exception { Container container = new Container(); container.subsystem(new MessagingFraction() .server( new MessagingServer() .enableInVmConnector() .topic("my-topic") .queue("my-queue") ) ); // Start the container container.start(); JaxRsDeployment appDeployment = new JaxRsDeployment(); appDeployment.addResource(MyResource.class); // Deploy your JAX-RS app container.deploy(appDeployment); // Create an MSC deployment ServiceDeployment deployment = new ServiceDeployment(); deployment.addService(new MyService("/jms/topic/my-topic" ) ); // Deploy the services container.deploy( deployment ); } }
Can I use it in production?
We wouldn’t recommend it. We just released 1.0.0.Alpha1. It’s pretty new and we’re sure there’s some dark corners that we have not addressed.
If you come across any issues or desire any improvements, file an issue over at GitHub, and we’ll do our best to make you happy.
What do I download?
There is no special download or installation instructions. Simply start using org.wildfly.swarm artifacts in your pom.xml, throw in the plugin and continue doing your builds. Everything is available through Maven Central.
1. never to be called just "Swarm", because Legal
相关知识
南构王小花手写 常规 Version 1.00 July 8, 2017, initial release
墨儿相惜花字体 Version 1.00 October 15, 2020, initial release图片样张
中国手写
符号字体/提取转换字体/区块组件字体/501
雕花字体
荷花字体
舒芙蕾
中文花体
英文花体
日文花体
网址: WildFly Swarm Initial Release https://www.huajiangbk.com/newsview2247954.html
上一篇: Handbook |
下一篇: Unified Types |
推荐分享

- 1君子兰什么品种最名贵 十大名 4012
- 2世界上最名贵的10种兰花图片 3364
- 3花圈挽联怎么写? 3286
- 4迷信说家里不能放假花 家里摆 1878
- 5香山红叶什么时候红 1493
- 6花的意思,花的解释,花的拼音 1210
- 7教师节送什么花最合适 1167
- 8勿忘我花图片 1103
- 9橄榄枝的象征意义 1093
- 10洛阳的市花 1039