• Post Reply Bookmark Topic Watch Topic
  • New Topic

Using EJB exposed as a service on SSL

 
aman thind
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to call my EJB exposed as a webservice.I am using EJB3,JBoss 4.2. Here are the related code changes

EJB:

@RemoteBinding(clientBindUrl="sslsocket://0.0.0.0:3843", jndiBinding="StatelessSSL")

Jboss:
jboss-service.xml:
<mbean code="org.jboss.remoting.transport.Connector"
name="jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3">
<depends>jboss.aop:service=AspectDeployer</depends>
<attribute name="InvokerLocator">socket://${jboss.bind.address}:3873</attribute>
<attribute name="Configuration">
<handlers>
<handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
</handlers>
</attribute>
</mbean>

<mbean code="org.jboss.remoting.transport.Connector"
name="jboss.remoting:type=Connector,transport=socket3843,handler=ejb3">
<depends>jboss.aop:service=AspectDeployer</depends>
<attribute name="InvokerLocator">sslsocket://0.0.0.0:3843</attribute>
<attribute name="Configuration">
<handlers>
<handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
</handlers>
</attribute>
</mbean>

SERVER.xml
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
keystoreFile="${jboss.server.home.dir}/conf/test.keystore"
keystorePass="changeit" maxThreads="150"
scheme="https" secure="true"
clientAuth="false"
truststoreFile="${jboss.server.home.dir}/conf/test.truststore"
truststorepass="changeit"
sslProtocol="TLS"/>

But it's throwing following exceptions
java.net.ConnectException: Connection refused: connect
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
org.jboss.resource.JBossResourceException: Could not create connection;


I am new to this and don't know if i am missing something.ANy pointers,tutorial will be helpful.

Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!