wildfly

Jackson 2 on Wildfly 10: How to load ProviderBase?

纵然是瞬间 提交于 2019-12-11 00:33:11
问题 There seems to be a lot of questions related to Wildfly and Jackson, yet I could not solve my problem despite searching the site far and wide... I want to use Jackson 2 to handle JSON serialization on an app deployed on Wildfly 10, but I keep getting stuck on loading the com.fasterxml.jackson.jaxrs.base.ProviderBase class. Offending code: @Provider public class CustomJsonProvider extends ResteasyJackson2Provider { @Inject private CustomSerializer customSerializer; private List<JsonSerializer<

How to make MDB Activation Spec contextual properties configurable?

喜欢而已 提交于 2019-12-11 00:16:07
问题 In our project, we are are using an MDB that listens for a message on a specific queue. It is defined as an annotation. Example: @MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName = "maxSessions", propertyValue = "20")}) . In order to change the value of the maxSessions, the code has to be compiled everytime. Even if i configure it in ejb-jar.xml instead of as an annotation , i need to compile the code and generate EAR file. Is there a way to make it user configurable

Using @Context in JAX-RS Provider to provide context information to CDI beans

ε祈祈猫儿з 提交于 2019-12-10 23:58:16
问题 I have some web-service (JAX-RS, WildFly 9, Resteasy) @RequestScoped public class SomeService{ // operations } Now I want to extract context information like user agent, which can be done using @Context private HttpHeaders httpHeaders; It seems only be possible to inject this context in JAX-RS-related classes, but not in CDI beans called by the webservice. It is possible to put it into the webservice but this clutters the service with stuff not related to the core response of the service.

How can I change WildFly listening ports with Maven?

自闭症网瘾萝莉.ら 提交于 2019-12-10 23:15:55
问题 I'm using wildfly-maven-plugin for my integration tests. How can I change port default numbers(8080, 8443)? I couldn't find any configuration property for those port numbers. UPDATE I tried yntelectual's answer but ports numbers are still in their default values. I found this and the port numbers are changed. But the start goal fails yielding "failed to start in XX seconds" may some signaling procedure doesn't know the changed port. <executions> <execution> <id>wildfly-start</id> <phase>pre

Rewrite engine for wildfly

落爺英雄遲暮 提交于 2019-12-10 21:15:18
问题 I'm wondering if It's possible to use Rewrite engine for Wildfly application server without any third-party library. I have tried to use RewriteValve, but it did not work with Wildfly 8.x If it's not possible, Is there any tiny library to use? 回答1: You can use Predicates Attributes and Handlers provided by undertow, you must add the file undertow-handlers.conf into WEB-INF directory with the rules. Another alternative is use prettyfaces. 来源: https://stackoverflow.com/questions/28218940

Redirect every HTTP request to HTTPS

只谈情不闲聊 提交于 2019-12-10 20:18:35
问题 I know, the answer is the following: <security-constraint> <web-resource-collection> <web-resource-name>All resources</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint> and it works pretty good, but only if it is the only one security-constraint in the web.xml. As soon as I add a second security-constraint, something like this: <security

WildFly jdbc connection with Oracle

混江龙づ霸主 提交于 2019-12-10 18:45:42
问题 I try to create jdbc connection. I use WildFly Application Server 9.0.0.CR1 and oracle 11g. I put ojdbc14 and created module.xml in the folder C:\wildfly-9.0.0.CR1\modules\com\oracle\ojdbc14\main: <?xml version="1.0" encoding="UTF-8"?> <module xmlns=xm lns="urn:jboss:module:1.0"" name="com.oracle.ojdbc14"> <resources> <resource-root path="ojdbc14.jar"/> </resources> <dependencies> <module name="javax.api"/> </dependencies> </module> and inserted to the standalone.xml: <subsystem xmlns="urn

Wildfly - how to enable transactions to enable lazy loading

我怕爱的太早我们不能终老 提交于 2019-12-10 18:20:27
问题 I have User and Post entities with a unidirectional relationship. I am getting org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: exception when I try to get all posts from a specific user. According to these SO answers, the optimal way to handle this is to use @Transactional annotation for the service method/class. Placing annotations does not work for me. I am using Wildfly server, Hibernate, MySQL, and Java EE MVC web framework. How do I make it

Java SSO with Wildfly 8, Java 1.8.0_45 and Active Directory

跟風遠走 提交于 2019-12-10 17:24:25
问题 I was searching a lot about this topic but can't find a solution. Short description of the requirements: SSO on a WebApp under Wildfly 8.2 Authenticate the Windows User to the Active Directory Fallback to Login Form, when SSO fails Running in a Domain Configuration of Wildfly Environment: Microsoft AD Windows Server 2012 R2 (1. Machine) Microsoft Server 2012 R2 with Wildfly 8.2 (2. Machine) The 2.Machine yas joined the Domain What I tried so far, is bound the AD and the Wildfly Server via

How to setup Log4j2 for an application deployed in WildFly 9?

家住魔仙堡 提交于 2019-12-10 17:12:40
问题 When I test my application with JUnit, it is printing the log as specified by layout pattern in log4j2.xml , but when I deploy my application in WildFly 9, I am no more getting the same format. Even the log level in Log4j2 is also not reflecting while deployed in server. JUnit log example: 2016-02-15 11:14:16,314 DEBUG [main] b.t.r.c.XAPool - a connection's state changed to IN_POOL, notifying a thread eventually waiting for a connection Server log example: 11:11:33,796 INFO [org.quartz.core