wildfly

Is there clean way to pass context data to @Asynchronous ejb call?

邮差的信 提交于 2019-12-10 16:37:28
问题 In wildfly I execute stateless ejb method asynchronously (it is mapped with @Asynchronous annotation). In the calling method I have some context information in thread local. What is the best way to pass this data to async method? I don't want to add additional parameter to async method signature. 回答1: Essentially you have only 2 options: Passing value as a parameter Storing that value in some global place. Like static variable. The first option is much cleaner and easier. Don't use the second

How to disable cache on Wildfly

青春壹個敷衍的年華 提交于 2019-12-10 15:38:02
问题 I'm using VRaptor 4 with Wildfly 9, and I realized that my navigation on localhost, on refresh or nagivation to anothers pages, the HTML content is reloaded normally. But in another host (ex: production), i need clear the browser cache to refresh page. Example: If I send a message to show a alert in view and navigate between another pages, and I go to the previous page, the alert remains displayed. I need clear the cache to disable the alert. How I can fix it? 回答1: You can set a response

Permissions error when using cli in Jboss wildfly and docker

◇◆丶佛笑我妖孽 提交于 2019-12-10 14:30:01
问题 I have extended a docker images, and when building the dockerfile, I call the Wildfly CLI to add a datasource. Then, when I try to run the dockerfile, I get the below error: ========================================================================= appui-dev-local | appui-dev-local | JBoss Bootstrap Environment appui-dev-local | appui-dev-local | JBOSS_HOME: /opt/jboss/wildfly appui-dev-local | appui-dev-local | JAVA: /usr/lib/jvm/java/bin/java appui-dev-local | appui-dev-local | JAVA_OPTS:

Share util jar file with war deployments in Wildfly

你。 提交于 2019-12-10 14:14:29
问题 Suppose I have a jar file called 'util.jar'. This jar file contains mostly JPA entities and some útil classes (no EJBs). How do I make this jar available to all wars deployed in Wildfly (without placing the jar inside the war's WEB-INF/lib)? I thied to create a module in Wildfly: <module xmlns="urn:jboss:module:1.3" name="br.edu.ufca"> <resources> <resource-root path="ufca.jar"/> </resources> <dependencies> </dependencies> </module> and in my war MANIFEST.MF file: Dependencies: br.edu.ufca

Hibernate 4 -> 5 migration: NamingStrategy changes, Tables not found

戏子无情 提交于 2019-12-10 12:55:25
问题 What i want to do I'm trying to migrate from WildFly 8.2.0 to WildFly 10.0.0 which means that i have (and want) to migrate from Hibernate 4.3 to Hibernate 5.0. Setup Java 8u40 Spring 4.1.9 SQL Server 2012 Wildfly 8.2.0 -> Wildfly 10.0.0 Hibernate 4.3.6 -> Hibernate 5.0.7 I have read the migration guide and i'm hit by the Naming Strategy changes. I have read many questions about this on SO, but mine seems a bit different. Hibernate complains that tables are not found: INFO [o.h.Version]

How to hunt down obscure HA clustering bug in Wildfly 8.2.0.Final

拥有回忆 提交于 2019-12-10 12:36:13
问题 The setup I have a Wildfly 8.2.0.Final application server running a cluster in domain mode using the full-ha profile. The cluster consists of two instances of wildfly, master and slave, each running on its own virtual machine. The application My project is deployed as a war-file on the application server. For test purposes my loadbalancer distributes the requests using round-robin. Anonymous users can use the service provided by this project using a button, which will call in two steps first

Wildfly using the Jackson provider instead of Jettison

北城以北 提交于 2019-12-10 11:53:26
问题 I've been using JBoss since version 4.3, I'm currently putting together a dimple demo webapp using Wildfly Beta1 , CDI , JPA and RESTeasy , but I can't get to configure the JSON provider like I use to do in my other JBossAS projects... I added a custom ContextResolver object to my project to correctly configure the JSON producer to serialize dates as ISO-8601 strings: package org.demo.config; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.ext

JEE Web Application Entity Not Found Wildfly

你。 提交于 2019-12-10 11:47:19
问题 I am using Wildfly 10. I am trying to bind an entity to a jsf page and save it with jpa to my db. I am getting a javax.servlet.ServletException: javax.ejb.EJBException: java.lang.IllegalArgumentException: Unknown entity : de.rupp.model.Contact$Proxy$_$$_WeldClientProxy javax.faces.webapp.FacesServlet.service(FacesServlet.java:671) My persistence.xml in WEB-INF/classes/META-INF: <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence"

JBAS011445: Failed to get adapter for persistence provider 'org.hibernate.ogm.jpa.HibernateOgmPersistence'

ぃ、小莉子 提交于 2019-12-10 11:43:26
问题 I try to deploy an application what uses hibernate ogm and I always get the error "Failed to get adapter for persistence provider 'org.hibernate.ogm.jpa.HibernateOgmPersistence'". I have installed the module ogm under WILDFLY_HOME/modules/org/hibernate but it didn't help. Do I need to configure something in standalone.xml? Does someone have an idea? Thanks and best regards 回答1: I had the same problem. By removing the following line from persistence.xml , wildfly got convinced to accept the

How to use JPA - EntityGraph to load only a subset of entity @Basic attributes?

孤人 提交于 2019-12-10 11:13:49
问题 I found this documentation about entity-graphs... after read it, it gave me the idea that you can used entity-graphs to retrieve only a subset of @Basic fields of a given entity (Until now, I have used entity-graphs to retrieve relationships EAGERLY, i.e, for example, load an Employee[including all its attributes] and its associated Department[including all its attributes])... So, I decided to try this using a small test: @Entity @Table(name = "employee") @NamedEntityGraphs({