View JUG_MS.adoc

Script: From War to Cloud

Swarm Tool

wget https://repo1.maven.org/maven2/org/wildfly/swarm/swarmtool/2017.4.0/swarmtool-2017.4.0-standalone.jar
java -jar swarmtool-2017.4.0-standalone.jar target/javaee7-simple-sample.war
java -jar javaee7-simple-sample-swarm.jar
View gist:28cd0e7a36037dfd51573045ecd62339
mvn gpg:sign-and-deploy-file \
-Dfile=target/proxy-1.0.0-alpha.1-SNAPSHOT.jar \
-Durl=https://repository.jboss.org/nexus/content/repositories/snapshots/ \
-DpomFile=pom.xml \
-DrepositoryId=jboss-snapshots-repository
View SSL.certs.txt
09:54:13,860 INFO [com.relayrides.pushy.apns.ApnsClient] (nioEventLoopGroup-3-1) Failed to connect.: javax.net.ssl.SSLHandshakeException: error:10000438:SSL routines:OPENSSL_internal:TLSV1_ALERT_INTERNAL_ERROR
at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.shutdownWithError(ReferenceCountedOpenSslEngine.java:696) [netty-handler-4.1.6.Final.jar:4.1.6.Final]
at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.sslReadErrorResult(ReferenceCountedOpenSslEngine.java:899) [netty-handler-4.1.6.Final.jar:4.1.6.Final]
at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.unwrap(ReferenceCountedOpenSslEngine.java:853) [netty-handler-4.1.6.Final.jar:4.1.6.Final]
at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.unwrap(ReferenceCountedOpenSslEngine.java:931) [netty-handler-4.1.6.Final.jar:4.1.6.Final]
at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.unwrap(ReferenceCountedOpenSslEngine.java:974) [netty-handler-4.1.6.Final.jar:4.1.6.Final]
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1
View Benchmarks.txt
Benchmark (messageBodyLength) (notificationCount) (unicodeBlockName) (useTokenAuthentication) Mode Cnt Score Error Units
c.r.p.a.util.ApnsPayloadBuilderBenchmark.testBuildWithMaximumLength 512 N/A BASIC_LATIN N/A thrpt 200 253526.502 ± 3131.245 ops/s
c.r.p.a.util.ApnsPayloadBuilderBenchmark.testBuildWithMaximumLength 512 N/A CJK_UNIFIED_IDEOGRAPHS N/A thrpt 200 239955.591 ± 2218.394 ops/s
c.r.p.a.util.ApnsPayloadBuilderBenchmark.testBuildWithMaximumLength 8192 N/A BASIC_LATIN N/A thrpt 200 11112.617 ± 89.035 ops/s
c.r.p.a.util.ApnsPayloadBuilderBenchmark.testBuildWithMaximumLength 8192 N/A CJK_UNIFIED_IDEOGRAPHS N/A thrpt 200 17144.974 ± 124.183 ops/s
c.r.p.a.ApnsCl
View gist:54423188d5f5a0b7b9e9b8f88c32031a
final Future<PushNotificationResponse<SimpleApnsPushNotification>> sendNotificationFuture = apnsClient.sendNotification(pushNotification);
sendNotificationFuture.addListener(new GenericFutureListener<Future<? super PushNotificationResponse<SimpleApnsPushNotification>>>() {
@Override
public void operationComplete(Future<? super PushNotificationResponse<SimpleApnsPushNotification>> pushNotificationFutue) throws Exception {
if (pushNotificationFutue.isSuccess()) {
final PushNotificationResponse<SimpleApnsPushNotification> pushNotificationResponse =
sendNotificationFuture.get();
if (pushNotificationResponse.isAccepted()) {
View SenderWithCallBacks.java
final List<String> tokens = Arrays.asList(
"123",
"456"
);
final ApnsClient apnsClient;
{
try {
apnsClient =new ApnsClientBuilder()
.setClientCredentials(new File("/home/Matthias/jajajaj.p12"), "jaja ja")
View gist:49d61b6d01862e59edb547752dc4d6bd
Caused by: java.lang.NoClassDefFoundError: Could not initialize class io.netty.handler.ssl.JdkAlpnApplicationProtocolNegotiator
at io.netty.handler.ssl.JdkSslContext.toNegotiator(JdkSslContext.java:283) [netty-handler-4.1.6.Final.jar:4.1.6.Final]
at io.netty.handler.ssl.JdkSslClientContext.<init>(JdkSslClientContext.java:261) [netty-handler-4.1.6.Final.jar:4.1.6.Final]
at io.netty.handler.ssl.SslContext.newClientContextInternal(SslContext.java:751) [netty-handler-4.1.6.Final.jar:4.1.6.Final]
at io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:406) [netty-handler-4.1.6.Final.jar:4.1.6.Final]
at com.relayrides.pushy.apns.ApnsClientBuilder.build(ApnsClientBuilder.java:430) [pushy-0.9.2.jar:]
View gist:a8f030e9e83798bff22675ef57175538
for (final String token: tokens) {
final SimpleApnsPushNotification pushNotification = createNotification(token, "Here is iteration: " + token);
final Future<PushNotificationResponse<SimpleApnsPushNotification>> sendNotificationFuture = apnsClient.sendNotification(pushNotification);
try {
final PushNotificationResponse<SimpleApnsPushNotification> pushNotificationResponse =
sendNotificationFuture.get();
View gist:f131c171168c1e099fb1d1f3308edd5e
javax.net.ssl.SSLHandshakeException: General OpenSslEngine problem
at io.netty.handler.ssl.ReferenceCountedOpenSslContext$AbstractCertificateVerifier.verify(ReferenceCountedOpenSslContext.java:604)
at org.apache.tomcat.jni.SSL.readFromSSL(Native Method)
at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.readPlaintextData(ReferenceCountedOpenSslEngine.java:457)
at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.unwrap(ReferenceCountedOpenSslEngine.java:824)
at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.unwrap(ReferenceCountedOpenSslEngine.java:931)
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1091)
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:968)
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:902)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:411)
View gist:57b3b77d6419937f31dd6b65f928d289
java.security.ProviderException: java.io.IOException: Only uncompressed point format supported
at sun.security.ec.ECParameters.decodePoint(ECParameters.java:88)
at sun.security.ec.ECKeyPairGenerator.generateKeyPair(ECKeyPairGenerator.java:138)
at java.security.KeyPairGenerator$Delegate.generateKeyPair(KeyPairGenerator.java:704)
at com.relayrides.pushy.apns.KeyPairUtil.generateKeyPair(KeyPairUtil.java:15)
at com.relayrides.pushy.apns.MockApnsServerTest.testRegisterPublicKey(MockApnsServerTest.java:46)