wildfly

WildFly的学习

好久不见. 提交于 2019-12-07 16:28:32
1. WildFly介绍: WildFly,前身是JBoss AS,从V8开始为区别于JBoss EAP,更名为WildFly. 由红帽 (Red Hat)开发,是另一个功能齐全且经过认证的应用服务器. Wildfly是一个开源的基于JavaEE的轻量级应用服务器。可以在任何商业应用中免费使用。 WildFly是一个灵活的、轻量的、强大管理能力的应用程序服务器。Wildfly是一个管理EJB的容器和服务器,但JBoss核心服务不包括支持servlet/JSP的WEB容器,一般与Tomcat或Jetty绑定使用。 特点 无与伦比的速度:快速启动,无限的网络性能和可扩展性。 非常的轻量级:瘦内存管理,运行时间可定制化。 强大的管理功能:统一的配置和管理。 下载安装 wildfly下载地址: https://wildfly.org/downloads/ 目前,最新版本是18.0.1.Final,选择“Java EE Full & Web Distribution”项对应的ZIP版本,点击下载即可。 安装java环境要求Java8或更高版本。下载好后, 直接解压, 放到一个目录下, standalone目录下存放的应用将单独占用进程,可单独启动和关闭,之间没有关联性。旗下有许多xml文件可供启动时选择。 domain目录下的应用之间有关联性,managing multiple

Configuring SSL in Wildfly 8

泪湿孤枕 提交于 2019-12-07 16:02:15
Configuring SSL in Wildfly 8 一:什么是SSL   SSL(Security Socket Layer)全称是加密套接字协议层,它位于HTTP协议层和TCP协议层之间,用于建立用户与服务器之间的加密通信,确保所传递信息的安全性,同时SSL安全机制是依靠数字证书来实现的。   SSL基于公用密钥和私人密钥,用户使用公用密钥来加密数据,但解密数据必须使用相应的私人密钥。使用SSL安全机制的通信过程如下:用户与服务器建立连接后,服务器会把数字证书与公用密钥发送给用户,用户端生成会话密钥,并用公共密钥对会话密钥进行加密,然后传递给服务器,服务器端用私人密钥进行解密,这样,用户端和服务器端就建立了一条安全通道,只有SSL允许的用户才能与IIS服务器进行通信。   提示:SSL网站不同于一般的Web站点,它使用的是“HTTPS”协议,而不是普通的“HTTP”协议。因此它的URL(统一资源定位器)格式为“https://网站域名”。 二:密码学的相关概念 密码学(cryptography):目的是通过将信息编码使其不可读,从而达到安全性。 明文(plain text):发送人、接受人和任何访问消息的人都能理解的消息。 密文(cipher text):明文消息经过某种编码后,得到密文消息。 加密(encryption):将明文消息变成密文消息。 解密

为 Java EE 应用提供的 9 种 Docker 方法

孤人 提交于 2019-12-07 14:34:59
原文地址: http://www.admin10000.com/document/6116.html 你想在 Java EE 应用中使用 Docker 吗?   一个典型的Java EE应用程序由应用服务器(例如: WildFly )和数据库(例如:Mysql)组成的。除此以外,你也许还需要一个前端负载:例如Apache,用于多台应用服务器的负载均衡,缓存:例如Infinispan,可以用于提高应用的整体性能。消息中间件:例如 ActiveMQ ,可以用于处理队列。缓存和消息组件可以用于集群的进一步扩展。   本文将先讲解一个简单 Docker 容器配置方法:包括应用服务器和数据库。接下来将讲解几个高级应用方法:包括前端负载、缓存、消息中间件和集群。   让我们开始吧!   如果你的机器之前没有安装过Docker,那么首先你需要安装Docker。你可以使用是最新版本的linux,它已经集成了Docker,或者使用安装命令: sudo apt-get install docker-io 在Mac和windows系统上,则需安装 boot2docker ,它是一个微内核的linux虚拟机包含Docker主机。同时你需要配置ssh秘钥和证书。   幸运的是, Docker Machine . 使用非常简单。你从头开始到创建完成一个Docker主机只需要一条指令

Can a deployment stop itself?

為{幸葍}努か 提交于 2019-12-07 14:14:58
问题 I'm currently searching for a way to stop a deployment on wildfly programmatically. Background: The application does some health checks in its startup phase using an MBean. If the app determines that the environment is not valid because some resources are missing, it needs to stop its own deployment. The way it was: The application was formerly running on JBoss 4 and simply stopped the whole app server calling the shutdown command using JMX. In case this command failed, it simply terminated

Spring boot and JBoss 8 Wildfly log configuration application

心已入冬 提交于 2019-12-07 11:14:04
问题 I have a Spring boot application prepare to be a WAR. It deploys without problems on Tomcat 8 (embedded or standalone) as well as on JBoss 8 Wildfly. But while on Tomcat we have had configured working logback configuration on JBoos it does not work any more. I have tried few different suggested solutions: https://stackoverflow.com/a/21887529/3997870 https://stackoverflow.com/a/23080264/3997870 The best which I have found was to add to my project WEB-INF/jboss-deployment-structure.xml with

Maven - No plugin found for prefix 'wildfly' in the current project

拜拜、爱过 提交于 2019-12-07 08:55:32
问题 Am using Wildfly 8 and I need to use the java batch processor from JSR 352. I downloaded the examples from https://github.com/javaee-samples/javaee7-samples but can't get them to work. On the batch folder I did mvn clean package wildfly:deploy but am getting the error No plugin found for prefix 'wildfly' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/krishnen/.m2/repository), codehaus-snapshots (http:

Browser cache expiration for js and css files with wildfly

旧街凉风 提交于 2019-12-07 05:15:06
问题 I have a angularjs javascript app packaged in a webapp deployed to Wildfly 8.2.1. Sometimes, when I deploy javascript or css modifications to this webapp, users have to manually delete their browser cache for the modifications appear. Is there a way to change this behavior so users don't have to delete their browser cache every time? 回答1: I've shared a Gist article about that. It describes how to configure response headers in wildfly undertow subsytem to tune expiration cache headers in

WildFly 8 Logging Levels

拥有回忆 提交于 2019-12-07 04:10:14
问题 How do I modify the WildFly 8 logging levels, specifically server.log. Currently I suspect they default to INFO and would like to change it to Debug or Error. For reference I've been exploring these articles https://docs.jboss.org/author/display/WFLY8/Logging+Configuration https://docs.jboss.org/author/display/WFLY8/How+To And suspect this is correct; <subsystem xmlns="urn:jboss:domain:logging:2.0"> <console-handler name="CONSOLE"> <level name="DEBUG"/> <formatter> <named-formatter name=

Activate JaxbAnnotationModule on Wildfly

会有一股神秘感。 提交于 2019-12-07 03:50:42
问题 I am trying to setup a REST service on Wildfly 8 that returns JSON with customized enum Values. I know that Wildfy uses Jackson 2.3 for the serialisation. I also know that when registering the JaxbAnnotationModule with the Jackson ObjectMapper the serializer produces the correct result. The question is, how do i configure my Wildfly Instance or my web-project to use this module. OK, to make this more clear, a simple example. First, this works properly and generates the result I need. @XmlEnum

Hosting multiple domains with WildFly (Undertow)

て烟熏妆下的殇ゞ 提交于 2019-12-07 03:20:59
问题 For example I have two domains ( app1.com , app2.com ) and two ears ( app1.ear , app2.ear ). Each EAR file consists of ejb.jar and web.war. Also each WAR has context root: /app1 or /app2 . So if I start WildFly I will have two applications running on localhost:8080/app1 and localhost:8080/app2 . How I can bind app1.com to localhost:8080/app1 and app2.com to localhost:8080/app2 ? As I understand, I should modify Undertow subsystem configuration in standalone.xml. I tried: <server name="default