Skip to content

Commit a89de6e

Browse files
committed
adding Docker related changes, and some more
1 parent 06e2a6e commit a89de6e

File tree

7 files changed

+159
-39
lines changed

7 files changed

+159
-39
lines changed

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
FROM centos/wildfly
2-
ADD jaxrs/jaxrs-client/target/jaxrs-client.war /opt/wildfly/standalone/deployments/
2+
RUN /opt/wildfly/bin/add-user.sh -up mgmt-users.properties admin Admin#70365 --silent
3+
CMD ["/opt/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0"]
4+
5+
#ADD jaxrs/jaxrs-client/target/jaxrs-client.war /opt/wildfly/standalone/deployments/

pom.xml

Lines changed: 116 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<org.jboss.arquillian.drone.version>1.3.0.Final</org.jboss.arquillian.drone.version>
1717
<org.jboss.arquillian.selenium.bom.version>2.40.0</org.jboss.arquillian.selenium.bom.version>
1818
<org.jboss.arquillian.graphene.version>2.0.2.Final</org.jboss.arquillian.graphene.version>
19+
<org.jboss.arquillian.cube.version>1.0.0.Alpha1</org.jboss.arquillian.cube.version>
1920
<org.jboss.arquillian.spock>1.0.0.Beta2</org.jboss.arquillian.spock>
2021
<org.wildfly>8.0.0.Final</org.wildfly>
2122
<org.jboss.eap>7.2.0.Final</org.jboss.eap>
@@ -29,33 +30,33 @@
2930
</properties>
3031

3132
<prerequisites>
32-
<maven>${maven.min.version}</maven>
33+
<maven>${maven.min.version}</maven>
3334
</prerequisites>
3435

3536
<modules>
36-
<module>test-utils</module>
37-
<module>batch</module>
38-
<module>cdi</module>
39-
<module>concurrency</module>
40-
<module>ejb</module>
41-
<module>el</module>
42-
<module>interceptor</module>
43-
<module>javamail</module>
44-
<module>jaspic</module>
45-
<module>jacc</module>
46-
<module>jaxrs</module>
47-
<module>jaxws</module>
48-
<module>jca</module>
49-
<module>jms</module>
50-
<module>jpa</module>
51-
<module>jta</module>
52-
<module>jsf</module>
53-
<module>json</module>
54-
<module>servlet</module>
55-
<module>validation</module>
56-
<module>websocket</module>
57-
<!-- module>extra</module -->
58-
<module>util</module>
37+
<module>test-utils</module>
38+
<module>batch</module>
39+
<module>cdi</module>
40+
<module>concurrency</module>
41+
<module>ejb</module>
42+
<module>el</module>
43+
<module>interceptor</module>
44+
<module>javamail</module>
45+
<module>jaspic</module>
46+
<module>jacc</module>
47+
<module>jaxrs</module>
48+
<module>jaxws</module>
49+
<module>jca</module>
50+
<module>jms</module>
51+
<module>jpa</module>
52+
<module>jta</module>
53+
<module>jsf</module>
54+
<module>json</module>
55+
<module>servlet</module>
56+
<module>validation</module>
57+
<module>websocket</module>
58+
<!-- module>extra</module -->
59+
<module>util</module>
5960
</modules>
6061

6162
<dependencyManagement>
@@ -373,17 +374,17 @@
373374
</build>
374375

375376
<reporting>
376-
<plugins>
377-
<plugin>
378-
<groupId>org.apache.maven.plugins</groupId>
379-
<artifactId>maven-surefire-report-plugin</artifactId>
380-
<version>2.17</version>
381-
<configuration>
382-
<aggregate>true</aggregate>
383-
<linkXRef>true</linkXRef>
384-
</configuration>
385-
</plugin>
386-
</plugins>
377+
<plugins>
378+
<plugin>
379+
<groupId>org.apache.maven.plugins</groupId>
380+
<artifactId>maven-surefire-report-plugin</artifactId>
381+
<version>2.17</version>
382+
<configuration>
383+
<aggregate>true</aggregate>
384+
<linkXRef>true</linkXRef>
385+
</configuration>
386+
</plugin>
387+
</plugins>
387388
</reporting>
388389

389390

@@ -666,6 +667,86 @@
666667
</testResources>
667668
</build>
668669
</profile>
670+
<profile>
671+
<id>wildfly-docker-arquillian</id>
672+
<properties>
673+
<browser>chromium-browser</browser>
674+
<serverProfile>standalone-full.xml</serverProfile>
675+
<serverRoot>${project.build.directory}/wildfly-${org.wildfly}</serverRoot>
676+
</properties>
677+
<dependencies>
678+
<dependency>
679+
<groupId>org.arquillian.cube</groupId>
680+
<artifactId>arquillian-cube-docker</artifactId>
681+
<version>${org.jboss.arquillian.cube.version}</version>
682+
<scope>test</scope>
683+
</dependency>
684+
<dependency>
685+
<groupId>io.undertow</groupId>
686+
<artifactId>undertow-websockets-jsr</artifactId>
687+
<version>1.0.0.Beta25</version>
688+
<scope>test</scope>
689+
</dependency>
690+
<!-- <dependency>
691+
<groupId>org.jboss.resteasy</groupId>
692+
<artifactId>resteasy-client</artifactId>
693+
<version>3.0.5.Final</version>
694+
<scope>test</scope>
695+
</dependency>
696+
<dependency>
697+
<groupId>org.jboss.resteasy</groupId>
698+
<artifactId>resteasy-jaxb-provider</artifactId>
699+
<version>3.0.5.Final</version>
700+
<scope>test</scope>
701+
</dependency>
702+
<dependency>
703+
<groupId>org.jboss.resteasy</groupId>
704+
<artifactId>resteasy-json-p-provider</artifactId>
705+
<version>3.0.5.Final</version>
706+
<scope>test</scope>
707+
</dependency>-->
708+
<dependency>
709+
<groupId>org.wildfly</groupId>
710+
<artifactId>wildfly-arquillian-container-remote</artifactId>
711+
<version>${org.wildfly}</version>
712+
<scope>test</scope>
713+
</dependency>
714+
</dependencies>
715+
<build>
716+
<testResources>
717+
<testResource>
718+
<directory>src/test/resources</directory>
719+
<filtering>true</filtering>
720+
</testResource>
721+
</testResources>
722+
<plugins>
723+
<plugin>
724+
<artifactId>maven-surefire-plugin</artifactId>
725+
<configuration>
726+
<systemPropertyVariables>
727+
<arquillian.launch>wildfly-docker</arquillian.launch>
728+
<arq.container.wildfly-docker.configuration.username>admin</arq.container.wildfly-docker.configuration.username>
729+
<arq.container.wildfly-docker.configuration.password>Admin#70365</arq.container.wildfly-docker.configuration.password>
730+
<arq.extension.docker.serverVersion>1.15</arq.extension.docker.serverVersion>
731+
<arq.extension.docker.serverUri>http://192.168.59.103:2376</arq.extension.docker.serverUri>
732+
<arq.extension.docker.dockerContainers>
733+
wildfly-docker:
734+
image: arungupta/javaee7-samples-wildfly
735+
exposedPorts: [8080/tcp, 9990/tcp]
736+
await:
737+
strategy: polling
738+
portBindings:
739+
- exposedPort: 8080/tcp
740+
port: 8080
741+
- exposedPort: 9990/tcp
742+
port: 9990
743+
</arq.extension.docker.dockerContainers>
744+
</systemPropertyVariables>
745+
</configuration>
746+
</plugin>
747+
</plugins>
748+
</build>
749+
</profile>
669750
<profile>
670751
<id>glassfish-embedded-arquillian</id>
671752
<dependencies>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0"?>
2+
<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://jboss.org/schema/arquillian"
4+
xsi:schemaLocation="http://jboss.org/schema/arquillian
5+
http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
6+
7+
<!-- <extension qualifier="docker">
8+
<property name="serverVersion">1.3.2</property>
9+
<property name="serverUri">http://localhost:2376</property>
10+
<property name="dockerContainers">
11+
wildfly:
12+
image: arungupta/wildfly-centos
13+
exposedPorts: [8080/tcp]
14+
await:
15+
strategy: polling
16+
portBindings:
17+
- exposedPort: 9990/tcp
18+
port: 9990
19+
20+
- exposedPort: 8080/tcp
21+
port: 8080
22+
</property>
23+
</extension>-->
24+
25+
</arquillian>

websocket/chat/activemq

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit e8f731cf808c63e1d38e1e4df998f62440d43d4e

websocket/chat/src/main/webapp/websocket.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var wsUri = "ws://" + document.location.hostname + ":" + document.location.port + document.location.pathname + "chat";
1+
var wsUri = "ws://" + document.location.hostname + ":8000" + document.location.pathname + "chat";
22
var websocket = new WebSocket(wsUri);
33

44
var username;

websocket/websocket-client-programmatic/src/main/java/org/javaee7/websocket/client/programmatic/MyEndpoint.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
package org.javaee7.websocket.client.programmatic;
22

3+
import java.io.IOException;
4+
import java.util.logging.Level;
5+
import java.util.logging.Logger;
36
import javax.websocket.OnMessage;
7+
import javax.websocket.Session;
48
import javax.websocket.server.ServerEndpoint;
59

610

@@ -11,8 +15,14 @@
1115
public class MyEndpoint {
1216

1317
@OnMessage
14-
public String sayHello(String name) {
18+
public String sayHello(String name, Session session) {
1519
System.out.println("Received message in endpoint : " + name);
20+
try {
21+
session.getBasicRemote().sendText("hello");
22+
session.getBasicRemote().sendText("howdy");
23+
} catch (IOException ex) {
24+
Logger.getLogger(MyEndpoint.class.getName()).log(Level.SEVERE, null, ex);
25+
}
1626
return "Hello " + name;
1727
}
1828

websocket/whiteboard/src/main/webapp/websocket.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var wsUri = "ws://" + document.location.hostname + ":" + document.location.port + document.location.pathname + "websocket";
1+
var wsUri = "ws://" + document.location.hostname + ":8000" + document.location.pathname + "websocket";
22
var websocket = new WebSocket(wsUri);
33
websocket.binaryType = "arraybuffer";
44
var output = document.getElementById("output");

0 commit comments

Comments
 (0)