Skip to content

Commit b846bcc

Browse files
authored
Merge pull request eugenp#841 from pritambanerjee999/master
BAEL 317: Setup EJB
2 parents 73bbab4 + 16b6ae9 commit b846bcc

5 files changed

Lines changed: 27 additions & 28 deletions

File tree

‎ejb/ejb-client/pom.xml‎

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
<?xml version="1.0"?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4-
<modelVersion>4.0.0</modelVersion>
5-
<parent>
6-
<groupId>com.baeldung.ejb</groupId>
7-
<artifactId>ejb</artifactId>
8-
<version>1.0-SNAPSHOT</version>
9-
</parent>
10-
<artifactId>ejb-client</artifactId>
11-
<name>EJB3 Client Maven</name>
12-
<description>EJB3 Client Maven</description>
13-
<properties>
14-
<junit.version>4.12</junit.version>
15-
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
16-
</properties>
17-
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>com.baeldung.ejb</groupId>
7+
<artifactId>ejb</artifactId>
8+
<version>1.0-SNAPSHOT</version>
9+
</parent>
10+
<artifactId>ejb-client</artifactId>
11+
<name>EJB3 Client Maven</name>
12+
<description>EJB3 Client Maven</description>
1813
<dependencies>
1914
<dependency>
2015
<groupId>org.wildfly</groupId>
@@ -49,6 +44,4 @@
4944
</plugin>
5045
</plugins>
5146
</build>
52-
53-
5447
</project>

‎ejb/ejb-client/src/main/resources/jboss-ejb-client.properties‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMO
55
remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT=false
66
remote.connection.default.connect.options.org.xnio.Options.SASL_DISALLOWED_MECHANISMS=${host.auth:JBOSS-LOCAL-USER}
77
remote.connection.default.username=testUser
8-
remote.connection.default.password=admin1234!
8+
remote.connection.default.password=admin1234!

‎ejb/ejb-remote/pom.xml‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212

1313
<!-- <name>ejb-remote</name> -->
1414
<dependencies>
15-
<dependency>
16-
<groupId>org.jboss.spec.javax.ejb</groupId>
17-
<artifactId>jboss-ejb-api_3.2_spec</artifactId>
18-
<scope>provided</scope>
19-
</dependency>
15+
<dependency>
16+
<groupId>javax</groupId>
17+
<artifactId>javaee-api</artifactId>
18+
<version>7.0</version>
19+
<scope>provided</scope>
20+
</dependency>
2021
</dependencies>
2122

2223
<build>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
package com.baeldung.ejb.tutorial;
22

3+
import javax.annotation.Resource;
4+
import javax.ejb.SessionContext;
35
import javax.ejb.Stateless;
46

57
@Stateless(name = "HelloWorld")
68
public class HelloWorldBean implements HelloWorld {
79

10+
@Resource
11+
private SessionContext context;
12+
813
@Override
914
public String getHelloWorld() {
1015
return "Welcome to EJB Tutorial!";
1116
}
1217

18+
1319
}

‎ejb/pom.xml‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,10 @@
3636
</dependency>
3737

3838
<dependency>
39-
<groupId>org.jboss.spec</groupId>
40-
<artifactId>jboss-javaee-7.0</artifactId>
41-
<version>1.0.1.Final</version>
42-
<type>pom</type>
43-
<scope>import</scope>
39+
<groupId>javax</groupId>
40+
<artifactId>javaee-api</artifactId>
41+
<version>7.0</version>
42+
<scope>provided</scope>
4443
</dependency>
4544

4645
<dependency>

0 commit comments

Comments
 (0)