jboss

Java WebSockets: OnClose method is not called when closing websocket connection

末鹿安然 提交于 2019-12-24 03:37:51
问题 Here is my WebSocket endpoint import javax.websocket.CloseReason; import javax.websocket.OnClose; import javax.websocket.OnMessage; import javax.websocket.Session; import javax.websocket.server.ServerEndpoint; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.twitter.hbc.core.Client; @ServerEndpoint("/tweets") public class TweetStreamServer { private static final Logger LOGGER = LoggerFactory.getLogger(TweetStreamServer.class); @OnMessage public void tweets(final String

jboss-web.xml validation error

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 03:29:19
问题 Why do i have a validation error on the element "resource-ref" in this very simple jboss-web.xml file? <?xml version="1.0" encoding="UTF-8"?> <jboss-web xmlns="http://www.jboss.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-web_6_0.xsd" version="6.0"> <resource-ref> <res-ref-name>jdbc/RoadsDB</res-ref-name> <jndi-name>java:/RoadsDB</jndi-name> </resource-ref> </jboss-web> If

maven and jboss modules

↘锁芯ラ 提交于 2019-12-24 03:27:23
问题 I'm new to maven and jboss so I'm tring to get benefit of cooperation between them. I have a maven project in eclipse. The project has many dependencies that at runtime I want to provide as module from jboss, otherwise my EAR will be very big. I also use a nexus repo for my dependencies. My question is: is there a way to sync the dependencies I have at compile time in my pom.xml with modules on jboss? Is there a way to create jboss modules according to dependencies I declared in pom? Probably

How to disable TRACE/TRACK HTTP in JBoss Wildfly?

时间秒杀一切 提交于 2019-12-24 03:01:39
问题 I want to disable TRACE/TRACK HTTP methods in JBoss wildfly 8.1 at server level and not in web.xml. How do do it? 回答1: Thanks Federico Sierra for the reply. I have tried again, but it seems by default TRACE is not disabled. I am getting 200 OK status code. See below. # curl -k -v -X TRACE https://localhost:8443 --user admin:Password@123 * About to connect() to localhost port 8443 (#0) * Trying ::1... * Connection refused * Trying 127.0.0.1... * connected * Connected to localhost (127.0.0.1)

How to disable TRACE/TRACK HTTP in JBoss Wildfly?

我与影子孤独终老i 提交于 2019-12-24 03:01:01
问题 I want to disable TRACE/TRACK HTTP methods in JBoss wildfly 8.1 at server level and not in web.xml. How do do it? 回答1: Thanks Federico Sierra for the reply. I have tried again, but it seems by default TRACE is not disabled. I am getting 200 OK status code. See below. # curl -k -v -X TRACE https://localhost:8443 --user admin:Password@123 * About to connect() to localhost port 8443 (#0) * Trying ::1... * Connection refused * Trying 127.0.0.1... * connected * Connected to localhost (127.0.0.1)

How can I ensure that the hornet queues are there when my webapp starts in JBOSS 6.0?

删除回忆录丶 提交于 2019-12-24 02:45:23
问题 previous title was: How do I get a JNDI reference to a queue within JBOSS 6 using Spring? I configured a JMS queue like this, which is in a file mytopic-hornetq-jms.xml: <?xml version="1.0" encoding="UTF-8"?> <configuration xmlns="urn:hornetq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd"> <topic name="mytopic"> <entry name="mytopic"/> </topic> </configuration> My applicationContext.xml looks like this: <?xml version="1.0"

how to implement a logger factory for jboss EAP 6.2 applications

纵然是瞬间 提交于 2019-12-24 02:39:15
问题 I am migrating a web app from weblogic portal application server to jboss EAP 6.2 server now My problem is whatever the logging framework we used in weblogic is not working in jboss so what are the best ways to implement logger for jboss web applications? Which is the best API to configure the loggerfactory either apache commons logging or log4j or java.util.logger? Thanks Karthik 回答1: you can remove the logging subsystem from configuration/domain.xml file. It will disable your jboss eap's

JBoss 7 project libraries as a module

泄露秘密 提交于 2019-12-24 02:23:21
问题 My project's war, after adding some maven dependencies, increased in size to 32MB! I need to reduce that size. Gooogling around I found that using modules could be the way. What's the best practice? Adding each library as a new module? Creating a module with "all libraries" ? I don't even know if that's possible. So, I have, for example: <dependency> <groupId>net.sf.jasperreports</groupId> <artifactId>jasperreports</artifactId> <version>5.0.0</version> </dependency> I want to add " provided "

In JBoss can I configure a “shared library” location?

折月煮酒 提交于 2019-12-24 02:07:08
问题 I am using JBoss 4.2.2.GA app server in a development environment. I have a WAR file, MyWar.war , and a JAR file ExternalJar.jar . These files are structured in the following way: Application WAR file: MyWar.war | |--- AppClass1.class | |--- AppClass2.class External jar file (provided by client): ExternalJar.jar | |--- ExternalClass.class ExternalClass needs to use AppClass1 and AppClass2 needs to use ExternalClass. When I deploy the WAR in JBoss and put JAR in JBoss' class path, I get a

JBoss EAP 6.4: NoClassDefFoundError on class sun.security.jca.GetInstance

元气小坏坏 提交于 2019-12-24 01:54:53
问题 I have a deployment that calls javax.crypto.SecretKeyFactory.getInstance . The class javax.crypto.SecretKeyFactory appears to load correctly, but when the method tries to create an instance it throws a NoClassDefFoundError on sun/security/jca/GetInstance Looking at the OpenJDK8 sources shows that relevant javax.crypto.SecretKeyFactory constructor refers explicitly to a method in sun.security.jca.GetInstance , so it's normal that it tries to load it. What's odd is that both javax/crypto