This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<databaseChangeLog | |
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog | |
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.2.xsd" | |
logicalFilePath="person-jpa"> | |
<changeSet logicalFilePath="person-jpa" id="Initial changeSet" author="ljnelson"> | |
<empty/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<databaseChangeLog | |
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog | |
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.2.xsd" | |
logicalFilePath="name-jpa"> | |
<changeSet logicalFilePath="name-jpa" id="Initial changeSet" author="ljnelson"> | |
<empty/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<databaseChangeLog | |
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog | |
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.2.xsd" | |
logicalFilePath="name-jpa-test"> | |
<include name="person-jpa-1.0.0-SNAPSHOT-jar/META-INF/liquibase/changelog.xml" relativeToChangelogFile="true"/> | |
<include name="test-classes/META-INF/liquibase/changelog.xml" relativeToChangelogFile="true"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Matches a RuntimeException followed immediately by an IllegalStateException | |
# whose message property is "hello". When found, the key "noDice" is | |
# looked up in the ResourceBundle identified by com.edugility.throwables.Bundle. | |
# The resulting message, if found, is run through MVEL's templating engine first, | |
# then through java.text.MessageFormat, then through java.util.Formatter. | |
java.lang.RuntimeException.../java.lang.IllegalStateException(message == "hello") | |
-- | |
com.edugility.throwables.Bundle#noDice | |
# If the prior test didn't match, then this one gets invoked. Entries in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" ?> | |
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee | |
http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd" | |
version="3.1"> | |
<enterprise-beans> | |
<session> | |
<ejb-name>ReferencingBeanName</ejb-name> | |
<ejb-local-ref> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package foo; | |
@Stateless | |
public class CaturgiatorBean { | |
@EJB(name = "foo.CaturgiatorBean/frobnicator") | |
private Frobnicator frobnicator; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package foo; | |
@Stateless | |
public class CaturgiatorBean { | |
@EJB | |
private Frobnicator frobnicator; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final Logger topLogger = Logger.getLogger(""); | |
assert topLogger != null; | |
Handler consoleHandler = null; | |
final Handler[] handlers = topLogger.getHandlers(); | |
if (handlers != null && handlers.length > 0) { | |
for (final Handler handler : topLogger.getHandlers()) { | |
if (handler instanceof ConsoleHandler) { | |
consoleHandler = handler; | |
break; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Returns {@code true} if the supplied {@link EntityManager} is | |
* non-{@code null} and contains the supplied {@link Object} in its | |
* persistence context. Unlike the {@link EntityManager#contains(Object)} | |
* method, this method will not throw any exceptions, and hence will | |
* never roll the containing transaction back. | |
* | |
* @param em the {@link EntityManager} in question; may be {@code null} | |
* in which case {@code false} will be returned | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static final <T extends Throwable> T toThrowable(final Class<T> throwableClass, final Throwable cause, Response response) { | |
Objects.requireNonNull(throwableClass, "throwableClass == null"); | |
Constructor<T> c = null; | |
try { | |
c = throwableClass.getConstructor(String.class, Throwable.class); | |
} catch (final NoSuchMethodException e) { | |
throw new IllegalArgumentException("throwableClass", e); | |
} | |
assert c != null : throwableClass + ".getConstructor(String.class, Throwable.class) == null"; |
OlderNewer