Skip to content

Instantly share code, notes, and snippets.

View solo-seven's full-sized avatar

Brian Ashburn solo-seven

View GitHub Profile
@solo-seven
solo-seven / boxgrinder.log
Created November 10, 2010 17:23
Base appliance
# Logfile created on Wed Nov 10 12:15:45 -0500 2010 by logger.rb/22285
T, [2010-11-10T12:15:45.760050 #15564] TRACE -- : Requiring plugin 'boxgrinder-build-fedora-os-plugin'...
T, [2010-11-10T12:15:45.902108 #15564] TRACE -- : Requiring plugin 'boxgrinder-build-rhel-os-plugin'...
T, [2010-11-10T12:15:45.906129 #15564] TRACE -- : Requiring plugin 'boxgrinder-build-centos-os-plugin'...
T, [2010-11-10T12:15:45.906751 #15564] TRACE -- : Requiring plugin 'boxgrinder-build-ec2-platform-plugin'...
T, [2010-11-10T12:15:45.907242 #15564] TRACE -- : Requiring plugin 'boxgrinder-build-vmware-platform-plugin'...
T, [2010-11-10T12:15:45.908045 #15564] TRACE -- : Requiring plugin 'boxgrinder-build-s3-delivery-plugin'...
T, [2010-11-10T12:15:45.908616 #15564] TRACE -- : Requiring plugin 'boxgrinder-build-sftp-delivery-plugin'...
T, [2010-11-10T12:15:45.909445 #15564] TRACE -- : Requiring plugin 'boxgrinder-build-local-delivery-plugin'...
T, [2010-11-10T12:15:45.913105 #15564] TRACE -- : Requiring plugin 'boxgrinder-build-eb
@solo-seven
solo-seven / gist:1159806
Created August 20, 2011 23:07
Here is a RESTful service that uses JPA and JMS within the same transaction
@GET
@Path("/load")
public String load() {
try {
LOG.debug("Getting Initial Context and looking up resources.");
Context ic = new InitialContext();
XAConnectionFactory xacf = (XAConnectionFactory) ic.lookup("XAConnectionFactory");
UserTransaction ut = (UserTransaction) ic.lookup("UserTransaction");
XAConnection conn = xacf.createXAConnection();
Queue workQueue = (Queue) ic.lookup("queue/WorkQueue");
package com.redhat.msg;
import java.io.IOException;
import java.sql.PreparedStatement;
import java.util.ArrayList;
import javax.jms.MessageConsumer;
import javax.jms.Queue;
import javax.jms.TextMessage;
import javax.jms.XAConnection;
package com.redhat.demo.msg.beans;
import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDriven;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.MessageProducer;
import javax.jms.Queue;
package com.redhat.demo.msg.web;
import java.net.InetAddress;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.XAConnection;
import javax.jms.XAConnectionFactory;
import javax.jms.XASession;
import javax.naming.InitialContext;
package com.redhat.demo.msg.beans;
import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDriven;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.MessageProducer;
import javax.jms.Queue;
@solo-seven
solo-seven / classic.jsp
Created October 11, 2011 13:31
Sample tiles setup
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<table>
<tr>
<td colspan="2">
<tiles:insertAttribute name="header" />
</td>
</tr>
<tr>
<td>
<tiles:insertAttribute name="menu" />
@solo-seven
solo-seven / new-ports-bindings-jboss-beans.xml
Created October 12, 2011 13:46
Additional port bindings
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="urn:jboss:bean-deployer:2.0">
<!-- Provides management tools with a ProfileService ManagementView
interface to the SBM and its components -->
<bean name="ServiceBindingManagementObject"
class="org.jboss.services.binding.managed.ServiceBindingManagementObject">
<constructor>
<!-- The name of the set of bindings to use for this server -->
@solo-seven
solo-seven / deploy.xml
Created May 18, 2012 12:00
Example Bundle Description
<?xml version="1.0"?>
<project name="test-bundle" default="main"
xmlns:rhq="antlib:org.rhq.bundle">
<rhq:bundle name="JON Webapp" version="0.0.1.r2" description="an example bundle">
<rhq:deployment-unit name="appserver" manageRootDir="true">
<rhq:archive name="myweb.war" exploded="false" ></rhq:archive>
</rhq:deployment-unit>
</rhq:bundle>
<target name="main" />
</project>
@solo-seven
solo-seven / JaxRsActivator.java
Created September 26, 2012 18:48
Here are the basic configuration components necessary for adding support for the 0.17 QPID JCA adapter to Glassfish. There have been basic tests done to connect with Red Hat Messaging 2.1.
package com.redhat.jboss.web;
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;
/**
* @author bashburn
*
*/
@ApplicationPath("/rest")