您的位置:首页 > 其它

jboss-as-7.1.1.Final 使用client远程调用,用户名密码验证出错

2014-06-12 16:36 585 查看
在myeclipse10.6上开发ejb程序部署到jboss-as-7.1.1.Final上后,在myeclipse写一个java程序验证是否正确时;

新建jboss-ejb-client.properties内容如下(之前已经在jboss上增加过用户了,client下的jar包什么的都已经加到classpath路径上了):

remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false

remote.connections=default

remote.connection.default.host=localhost

remote.connection.default.port = 4447

remote.connection.default.username=localhost

remote.connection.default.password=shenyf

remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false

jndi.properties内容如下:

java.naming.factory.initial=org.jboss.naming.remote.client.InitialContextFactory

java.naming.factory.url.pkgs=org.jboss.ejb.client.naming

java.naming.provider.url=remote://localhost:4447

javax.naming.Context.SECURITY_PRINCIPAL=localhost

javax.naming.Context.SECURITY_CREDENTIALS=shenyf

执行时总是报错连接不了4447端口!google了几天才发现是7.1.1的bug

还是换用jboss-as-6.1.0了,只需要配一个文件jndi.properties如下

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=127.0.0.1

自己记一下!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: