wildfly

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

风流意气都作罢 提交于 2019-12-05 16:39:34
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://nexus.codehaus.org/snapshots/ ), central ( http://repo.maven.apache.org/maven2)] Any ideas what may

Injecting EntityManager in JBoss/WildFly

大憨熊 提交于 2019-12-05 14:50:33
I am learning JPA, EJB and JBoss/WildFly. I need to inject an EntityManager into my application. I am trying to do it in the following way: @Stateless @LocalBean public class ProductsService implements IProductsService { @PersistenceContext(unitName = "myUnit") EntityManager entityManager; //.... } And I have persistence.xml file in the META-INF directory in my .war archive: <?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0"> <persistence-unit name="myUnit"> <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>

Wildfly/JBoss deployment startup order

让人想犯罪 __ 提交于 2019-12-05 14:49:27
We use a service orientated architecture approach where we have some core services used by other services. On startup, our services usually load up a cache of data from the core services so that it's available when a request comes in or scheduled tasks run. I'm using Wildfly 8.2.0 and have Project A which depends on Project B (both are .war's). Project A needs to wait for Project B to be loaded in order to start up. Here is jboss-deployment-structure.xml in project B: <?xml version='1.0' encoding='UTF-8'?> <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2"> <deployment>

JAX-RS (Resteasy 3.5.0.Final) + Wildfly 12 + Java 9 + maven = 404 not found, but JAX-RS (Resteasy 3.5.0.Final) + Wildfly 12 + Java 8 + maven works

妖精的绣舞 提交于 2019-12-05 11:59:38
I have got a simple Hello World example JAX-RS project. Really simple and stupid. Just minimal configuration, which I intend to enhance in future, just imagine something like this with : https://robferguson.org/blog/2016/12/02/getting-started-with-resteasy/ . Well, my problem is, that when I set the Java version to "1.9", I always receive a "404 not found" error. But when I change it back to 1.8, mvn clean install and deploy, it works fine. The java version is the only delta, which makes it working or not working. How to make it work with java 9? I do use maven 3.5 and jdk 9.0.4. works fine:

wildfly or jboss 7.1 standalone.xml dtd

雨燕双飞 提交于 2019-12-05 10:15:10
I understand that this question is not very specific to programming but I am trying to find the description of each tag in standalone.xml in wildfly or jboss 7.1 so that I can learn about each tag and it will be helpful for configuration. Where can I find a document that describes tags used in standalone.xml? jBoss or Wildfly administration guide does not give all the information. James R. Perkins's right. Under $JBOSS_HOME/docs/schema there are several schemas, which describe the tags of standalone.xml. The table on https://developer.jboss.org/wiki/JBossDTDs denotes which 'DTD or Schema'

Browser cache expiration for js and css files with wildfly

陌路散爱 提交于 2019-12-05 08:24:42
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? 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 server http response, for specific static contents such as .js, .css, ... files. 来源: https://stackoverflow.com

Invoke EJB from WildFly safely

夙愿已清 提交于 2019-12-05 06:56:47
I'm trying to re-write my old application in enterprise, "business" way. So, I've got a Swing client with login module and my own server created from scratch. The client use ssl certificate to encrypt TCP connection to the server (I check client certificate on server and server certificate on client) and then server use database to authenticate and authorize the user. Now I'm trying to get it working with ejb hosted by WildFly 8 CR1. I want to use the same client-server keys pair to connect Swing client to WildFly server and then authenticate user with name and credentials stored in MySQL

Required ports for JMS using HornetQ (JBoss) to expose on docker container

China☆狼群 提交于 2019-12-05 06:40:28
I'm using Docker to link JMS server container to another JMS client container. But when I run the server in the docker container, the client can not connect to the server correctly. I exposed port 443 on docker (Is there any other port which JMS uses?) I can successfully create destication, but not the JMS context: String PROVIDER_URL = "https-remoting://MYDOMAIN:443"; ... /** PASSED **/ Destination destination = (Destination) namingContext.lookup(destinationString); /** HAS ERROR **/ JMSContext context = connectionFactory.createContext(username, password) Here is the error: java.nio.channels

Wildfly 10 can't connect datasource: invalid connection

大憨熊 提交于 2019-12-05 06:36:48
Problem I'm trying test my connection and it keeps giving me the same error while at first sight I can't see what I did wrong. Maybe I'm overlooking something... Error nexpected HTTP response: 500 Request { "address" => [ ("subsystem" => "datasources"), ("data-source" => "ProjectenDS") ], "operation" => "test-connection-in-pool" } Response Internal Server Error { "outcome" => "failed", "failure-description" => "WFLYJCA0040: failed to invoke operation: WFLYJCA0047: Connection is not valid", "rolled-back" => true } Standalone-full.xml <subsystem xmlns="urn:jboss:domain:datasources:4.0">

HTTP Handler and Resteasy Deployment with undertow and resteasy

大兔子大兔子 提交于 2019-12-05 06:31:34
I am trying to run both HTTPServer and also the REST Handler. Only one works at a time not able to make it work both at same time. I need to serve html pages and also the api. here is my code. public class HttpServer { private final UndertowJaxrsServer server = new UndertowJaxrsServer(); private static String rootPath = System.getProperty("user.dir"); private final Undertow.Builder serverBuilder; public HttpServer(Integer port, String host) { serverBuilder = Undertow .builder() .addHttpListener(port, host) .setHandler( Handlers.path().addPrefixPath( "/", Handlers.resource( new