Skip to content

Instantly share code, notes, and snippets.

View johnament's full-sized avatar

John Ament johnament

View GitHub Profile
import org.jboss.weld.context.bound.BoundRequestContext;
import javax.enterprise.inject.spi.CDI;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletRequestEvent;
import javax.servlet.ServletRequestListener;
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.glassfish</groupId>
<artifactId>testfish1</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>testfish1</name>
@johnament
johnament / patch.txt
Last active August 29, 2015 14:05
URL Does Not Exist
diff --git a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/meta/RepositoryComponents.java b/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/meta/RepositoryComponents.java
index 1686e31..55d77da 100644
--- a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/meta/RepositoryComponents.java
+++ b/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/meta/RepositoryComponents.java
@@ -18,6 +18,7 @@
*/
package org.apache.deltaspike.data.impl.meta;
+import org.apache.deltaspike.data.api.AbstractEntityRepository;^M
import org.apache.deltaspike.data.impl.RepositoryDefinitionException;
@johnament
johnament / initialized.log
Created September 1, 2014 22:48
Controller
johns-mbp:target johnament$ java -jar weld-cdi-javafx-bug-1.0-SNAPSHOT.jar
Sep 01, 2014 6:41:53 PM org.jboss.weld.bootstrap.WeldStartup <clinit>
INFO: WELD-000900: SNAPSHOT
Sep 01, 2014 6:41:54 PM org.jboss.weld.bootstrap.WeldStartup startContainer
INFO: WELD-000101: Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
Sep 01, 2014 6:41:54 PM org.jboss.weld.interceptor.util.InterceptionTypeRegistry <clinit>
WARN: WELD-001700: Interceptor annotation class javax.ejb.PostActivate not found, interception based on it is not enabled
Sep 01, 2014 6:41:54 PM org.jboss.weld.interceptor.util.InterceptionTypeRegistry <clinit>
WARN: WELD-001700: Interceptor annotation class javax.ejb.PrePassivate not found, interception based on it is not enabled
Sep 01, 2014 6:41:54 PM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
@johnament
johnament / cdi.ad
Created September 3, 2014 16:29
Test AD
== Test
*foo*
@johnament
johnament / ConfigProducer.java
Created September 12, 2014 23:01
Loading configuration
@ApplicationScoped
public class ConfigProducer {
private Configuration config;
public void observe(@Observes Configuration config) {
this.config = config;
}
@Produces
@ApplicationScoped
public Configuration produce() {
return config;
@johnament
johnament / pom.xml
Created September 21, 2014 15:50
Example config for exec plugin.
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<executions>
<execution><!-- apply patch to WildFly 8.1 -->
<id>prep-patch</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
2015-06-12 20:33:05,431 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Core 1.0.0.CR1 "Kenny" started in 1255ms - Started 99 of 106 services (17 services are lazy, passive or on-demand)
2015-06-12 20:33:06,249 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0027: Starting deployment of "mysql" (runtime-name: "mysql")
2015-06-12 20:33:06,381 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-15) WFLYJCA0005: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
2015-06-12 20:33:06,382 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-15) WFLYJCA0005: Deploying non-JDBC-compliant driver class com.mysql.fabric.jdbc.FabricMySQLDriver (version 5.1)
2015-06-12 20:33:06,386 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-9) WFLYJCA0018: Started Driver service with driver-name = mysql_com.mysql.jdbc.Driver_5_1
2015-06-12 20:33:06,386 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service threa
@johnament
johnament / CDIMethodVsFieldProducer
Created December 31, 2010 13:59
Should these two producers be the exact same?
@Produces
@ApplicationScoped
@Resource("/ConnectionFactory")
private ConnectionFactory cf;
vs.
@Resource("/ConnectionFactory")
private ConnectionFactory cf;
@johnament
johnament / CDIMessageListener.java
Created January 9, 2011 16:25
Should this work correctly with HornetQ?
@ApplicationScoped
@SomeQualifier
public class CDIMessageListener implements MessageListener {
@Inject Logger logger;
public void onMessage(Message m) {
logger.info("Received a message of type "+m.getClass().getCanonicalName());
}
}