Skip to content

Instantly share code, notes, and snippets.

$ git --version
git version 2.15.2 (Apple Git-101.1)
hub version 2.2.9
$ time git clone https://ipfs.io/ipfs/QmQFVzbiueHb6CtuN7aa6W67Uzr9kaeVKsVYLHoFLWDcxz --single-branch
Cloning into 'QmQFVzbiueHb6CtuN7aa6W67Uzr9kaeVKsVYLHoFLWDcxz'...
 349.70 real 1.03 user 1.05 sys
$ unzip -l /tmp/arquillian1809488349651520467/EmployeeRepositoryIT.war | awk '{print $4}' | sort
[...]
----
META-INF/
META-INF/arquillian-testable
META-INF/jboss-deployment-structure.xml
META-INF/load.sql // this shold be located in "WEB-INF/classes/META-INF/load.sql"
META-INF/persistence.xml // this shold be located in "WEB-INF/classes/META-INF/persistence.xml"
project-defaults.yml
@emag
emag / add-module.cli
Created January 24, 2017 05:51
CLI で JDBC ドライバを静的モジュールとして登録
module add --name=com.oracle \
--resources=/tmp/odbc-xxx.jar \
--dependencies=javax.api,javax.transaction.api
@emag
emag / dynamic-jdbc-driver-deployment.md
Last active January 23, 2017 11:52
動的モジュールとして登録した(=デプロイした) JDBC ドライバがちゃんと登録されているかのチェック

動的モジュールとして登録した(=デプロイした) JDBC ドライバがちゃんと登録されているかのチェック

standalone.xml を見る

デプロイされていれば standalone*.xml に <deployments> 要素が生まれている。

<deployments>
  <deployment name="postgresql-9.4.1212.jar" runtime-name="postgresql-9.4.1212.jar">
 
swarm.logging.file-handlers.FILE.append                              = (unset)                                                                                                                                     
swarm.logging.file-handlers.FILE.autoflush                           = (unset)
swarm.logging.file-handlers.FILE.enabled                             = (unset)
swarm.logging.file-handlers.FILE.encoding                            = (unset)
swarm.logging.file-handlers.FILE.file                                = {path=server.log, relative-to=jboss.server.log.dir}
swarm.logging.file-handlers.FILE.filter-spec                         = (unset)
swarm.logging.file-handlers.FILE.formatter                           = %d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n
swarm.logging.file-handlers.FILE.level                               = INFO
swarm.logging.file-handlers.FILE.named-formatter                     = (unset)
@emag
emag / error-with-enhanced-jax-rs-client.md
Created December 15, 2016 14:22
Error With Enhanced- JAX-RS Client
$ ./mvnw clean package -pl calc; and java -jar calc/target/calc-swarm.jar 
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building calc 2016.12.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ calc ---
[INFO] Deleting /home/tanabe/workspace/javaee-advent-calendar/2016/enhanced-jax-rs-client/calc/target
@emag
emag / wildfly-swarm-handson-preparation.md
Last active December 4, 2016 09:27
WildFly Swarm ハンズオン事前準備

WildFly Swarm ハンズオン事前準備

本ハンズオンはご自身の PC を持ち込んで実施いただく必要があります。 また、以下の事前準備を実施ください。

ご不明点は下記 筆者 Twitter までご連絡いただければと思います。

インストールするもの

事前に以下のものを PC にインストールしてください。

@emag
emag / keycloak-it.json
Last active December 21, 2016 11:47
Keycloak files for WildFly Swarm Tour
{
"realm": "lifelog",
"realm-public-key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwjjEd/r7wzg599XzAEyGS0gxNMe8lhisLYLRcyTxPB35AMIbVjGQUrhdjT6xmHegaQ47+Eb72f5phGFOBpmSh1Ce4xnBy1jGXQC1xBJy8lm67ivbp631xKLJRdacL96igR/v12DCy2K3kQ+GEcsxr9/JFBrRlsJxp01eZ6iBk3/0W9m/LzlSjYY7aFXrRtPTROgavGCHMNdfAhRLb7+uIMo2XyK5cg63KL9bVcWPu4aCgvnE+9BF7hc3kwaEYmw3QI9CW/Zg1AVOvai9THNVTSAKZxZckzSwYxHQtT9kTZdKW67mih5tbpe/dF+OAZtet5VI9tUpj4rSRhKVFw3YuwIDAQAB",
"bearer-only": true,
"auth-server-url": "http://localhost:28080/auth",
"ssl-required": "external",
"resource": "lifelog"
}
$ ll /bin/java
lrwxrwxrwx. 1 root root 22  9月  3 13:23 /bin/java -> /etc/alternatives/java*
$ echo $JAVA_HOME 

~ 
$ sh -x /usr/bin/heapstats-cli 
+ prefix=/usr
+ exec_prefix=/usr
+ libexecdir=/usr/libexec/heapstats
$ ./mvnw clean verify \
    -Dswarm.project.stage.file=file://(pwd)/lifelog-project-stages.yml \
    -Dswarm.logging=DEBUG
[...]

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running lifelog.api.EntryControllerIT