Skip to content

Instantly share code, notes, and snippets.

View dblevins's full-sized avatar

David Blevins dblevins

View GitHub Profile
import javax.annotation.PostConstruct;
import javax.ejb.Lock;
import javax.ejb.LockType;
import javax.ejb.Singleton;
import javax.ejb.Startup;
import javax.enterprise.inject.Produces;
import javax.persistence.EntityManagerFactory;
@Singleton // Only need one of these
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
#!/bin/bash
git clone git@github.com:tomitribe/tomee-jaxrs-starter-project.git &&
cd tomee-jaxrs-starter-project &&
mvn clean install tomee:exec &&
java -jar target/tomee-rest-arquillian-1.0-SNAPSHOT-exec.jar
#!/bin/bash
git clone git@github.com:tomitribe/simple-microservice.git &&
cd simple-microservice &&
mvn clean install &&
java -jar target/microservice-1.1.0-SNAPSHOT.jar
import java.io.File;
import java.lang.annotation.Annotation;
public class FileConstraints {
{
final Mapper mapper = new Mapper();
mapper.map(Executable.class, File.class, File::canExecute);
mapper.map(Writable.class, File.class, File::canWrite);
#!/bin/bash
cat > /tmp/termcolors.java <<EOF
public class termcolors {
public static void main(String[] args) {
for (int i = 0; i < 256; i++) {
System.out.printf("\033[38;5;%sm#@%03d", i, i);
System.out.print(" ");
if (i % 12 == 0) System.out.println();
#!/bin/bash
STRING=$(echo -n "(request-target): get /signature-prototype-1.0-SNAPSHOT/api/colors/preferred
date: Tue, 07 Jun 2014 20:51:35 GMT" | base64)
SIGNATURE=$(
echo -n "(request-target): get /signature-prototype-1.0-SNAPSHOT/api/colors/preferred
date: Tue, 07 Jun 2014 20:51:35 GMT" | openssl dgst -binary -sha256 -hmac "PennyLunaLuka" | base64)
Index: devtests/ejb/ejb32/mdb/ejb/ResultsBean.java
===================================================================
--- devtests/ejb/ejb32/mdb/ejb/ResultsBean.java (revision 0)
+++ devtests/ejb/ejb32/mdb/ejb/ResultsBean.java (revision 0)
@@ -0,0 +1,40 @@
+package com.sun.s1asdev.ejb.ejb32.mdb.ejb;
+
+import javax.ejb.LocalBean;
+import javax.ejb.Lock;
+import javax.ejb.LockType;
Index: appserver/ejb/ejb-container/src/main/java/org/glassfish/ejb/deployment/descriptor/EjbMessageBeanDescriptor.java
===================================================================
--- appserver/ejb/ejb-container/src/main/java/org/glassfish/ejb/deployment/descriptor/EjbMessageBeanDescriptor.java (revision 59286)
+++ appserver/ejb/ejb-container/src/main/java/org/glassfish/ejb/deployment/descriptor/EjbMessageBeanDescriptor.java (working copy)
@@ -41,10 +41,12 @@
package org.glassfish.ejb.deployment.descriptor;
import java.lang.reflect.Method;
+import java.util.ArrayList;
import java.util.Collection;