-
Feb 5th, 2008, 03:25 AM
#1
Bad credentials with MBeanServerConnectionFactoryBean
Hi. Altough I can connect with the same user and password to my jmx server using JCONSOLE, I cannot seem to manage logging in with my client. Here is the code:
<bean id="jmxServerClient"
class="org.springframework.jmx.support.MBeanServer ConnectionFactoryBean">
<property name="serviceUrl"
value="service:jmx:rmi://localhost/jndi/rmi://localhost:8335/connector" />
<property name="environment">
<props>
<prop key="java.naming.security.principal">xxxxxx</prop>
<prop key="java.naming.security.credentials">yyyyy</prop>
</props>
</property>
</bean>
The errro is "Bad credentials" ? What should I do in this case ?
-
Feb 6th, 2008, 07:42 AM
#2
I can't believe it. Nobody knows what is the proper way to connect to a JMX server, using the MBeanServerConnectionFactoryBean in order to supply the necessary credentials ?
-
Feb 7th, 2008, 02:45 AM
#3
Here is the server configuration
<bean id="registry"
class="org.springframework.remoting.rmi.RmiRegistr yFactoryBean">
<property name="port" value="8335" />
</bean>
<bean id="serverConnector"
class="org.springframework.jmx.support.ConnectorSe rverFactoryBean">
<property name="objectName" value="connector:name=rmi" />
<property name="serviceUrl"
value="service:jmx:rmi://localhost/jndi/rmi://localhost:8335/connector" />
<property name="server" ref="jmxServer" />
<property name="environment">
<map>
<entry key="jmx.remote.authenticator"
value-ref="jmxRemoteAuthenticator" />
</map>
</property>
</bean>
<bean id="jmxRemoteAuthenticator"
class="mx4j.tools.remote.PasswordAuthenticator">
<constructor-arg>
<bean factory-method="getInputStream"
factory-bean="jmxRemotePasswords" />
</constructor-arg>
</bean>
<bean id="resourceLoader"
class="org.springframework.core.io.DefaultResource Loader" />
<bean id="jmxRemotePasswords" factory-method="getResource"
factory-bean="resourceLoader">
<constructor-arg value="classpath
asswords.txt" />
</bean>
-
Feb 8th, 2008, 02:06 AM
#4
How did you manged to connect to the above server, using MBeanServerConnectionFactoryBean and prviding the username and password in order to pass the security check ?
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules