Permalink
Browse files

Fix variety of issues in ejb-remote: Remove unneeded JBossSaslProvide…

…r registration, fix client POM to use jboss-as-ejb-client-bom, Remove unused properties from jboss-ejb-client.properties file
  • Loading branch information...
1 parent 6dea123 commit 353a4fee43d95a298f625b8e48bd165a15b9b39d @jaikiran jaikiran committed with sgilda Apr 20, 2012
View
@@ -44,6 +44,14 @@
<type>pom</type>
<scope>import</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-ejb-client-bom</artifactId>
+ <version>7.1.1.Final</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
</dependencies>
</dependencyManagement>
@@ -78,45 +86,40 @@
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-ejb-client</artifactId>
- <version>1.0.2.Final</version>
<scope>runtime</scope>
</dependency>
<!-- client communications with the server use XNIO -->
<dependency>
<groupId>org.jboss.xnio</groupId>
<artifactId>xnio-api</artifactId>
- <version>3.0.3.GA</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.jboss.xnio</groupId>
<artifactId>xnio-nio</artifactId>
- <version>3.0.3.GA</version>
<scope>runtime</scope>
</dependency>
<!-- The client needs JBoss remoting to access the server -->
<dependency>
<groupId>org.jboss.remoting3</groupId>
<artifactId>jboss-remoting</artifactId>
- <version>3.2.2.GA</version>
<scope>runtime</scope>
</dependency>
<!-- Remote EJB accesses can be secured -->
<dependency>
<groupId>org.jboss.sasl</groupId>
<artifactId>jboss-sasl</artifactId>
- <version>1.0.0.Final</version>
+ <scope>runtime</scope>
</dependency>
<!-- data serialization for invoking remote EJBs -->
<dependency>
<groupId>org.jboss.marshalling</groupId>
<artifactId>jboss-marshalling-river</artifactId>
- <version>1.3.9.GA</version>
<scope>runtime</scope>
</dependency>
@@ -22,16 +22,14 @@
package org.jboss.as.quickstarts.ejb.remote.client;
+import org.jboss.as.quickstarts.ejb.remote.stateful.RemoteCounter;
+import org.jboss.as.quickstarts.ejb.remote.stateless.RemoteCalculator;
+
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
-import java.security.Security;
import java.util.Hashtable;
-import org.jboss.as.quickstarts.ejb.remote.stateful.RemoteCounter;
-import org.jboss.as.quickstarts.ejb.remote.stateless.RemoteCalculator;
-import org.jboss.sasl.JBossSaslProvider;
-
/**
* A sample program which acts a remote client for a EJB deployed on AS7 server.
* This program shows how to lookup stateful and stateless beans via JNDI and then invoke on them
@@ -40,15 +38,6 @@
*/
public class RemoteEJBClient {
- // The EJB invocation happens via the JBoss Remoting project, which uses SASL for
- // authentication for client-server authentication. There are various different security algorithms that
- // SASL supports. In this example we use "anonymous" access to the server and for that we register
- // the JBossSaslProvider which provides support for that algorithm. Depending on how which algorithm
- // is used, this piece of code to register JBossSaslProvider, may or may not be required
- static {
- Security.addProvider(new JBossSaslProvider());
- }
-
public static void main(String[] args) throws Exception {
// Invoke a stateless bean
invokeStatelessBean();
@@ -27,9 +27,5 @@ remote.connection.default.host=localhost
remote.connection.default.port = 4447
remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
-remote.connection.two.host=localhost
-remote.connection.two.port = 4447
-remote.connection.two.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
-

0 comments on commit 353a4fe

Please sign in to comment.