Hi Tom

According to your code I cannot find (at first glance) a problem with the
JMX
stuff, this looks fine.

The only problem I see is that you have several stopService() calls in your
PostgresKeyManagerImpl:
public void initService()
throws Exception
{
try
{
// Bind in JNDI
bind((Context)(new InitialContext()), jndiName, this);
}
catch( NamingException ne )
{
log.log( ne.getMessage() );
log.log( ne.toString() );
return;
}

log.log( "KeyManager " + jndiName + " started and bound." );

==> refreshHighNum();
}

private void refreshHighNum()
{
log.log( "High byte of keys being generated from database." );
try
{
Connection conn = getConnection();
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery
( "SELECT NEXTVAL( 'KEYMANAGER_SEQUENCE' ) AS HIGH_BYTE" );
rs.next();
log.log( "Old high byte: " + high_num );
high_num = (byte)rs.getByte( 1 );
log.log( "New high byte: " + high_num );
}
catch( Throwable e )
{
==> stopService();
log.log( e.getMessage() );
log.log( e.toString() );
}
}

this stopService() unbinds the service and maybe this can be the source of
the
problem. Can you check on :8082 (which is the HTMLAdaptor of JMX) to see
if your MBean is started or stopped (I think it is attribute "status").

Have fun - Mad Andy


----- Original Message -----
From: Tom Cook <[EMAIL PROTECTED]>
To: jBoss <[EMAIL PROTECTED]>
Sent: Wednesday, September 13, 2000 10:02 PM
Subject: Re: [jBoss-User] MBean client problems


> Andreas Schaefer writes:
>  > Hi Tom
>  >
>  > Could you please give me the part of the jboss.conf where the your
MBean
>  > <MLET> tag
>  > is within.
>
> <MLET CODE="org.jboss.jdbc.DataSourceImpl"
> ARCHIVE="jboss.jar,jdbc2_0-stdext.jar,postgresql.jar"
> CODEBASE="../lib/ext/">
> <ARG TYPE="java.lang.String"
VALUE="jdbc:postgresql://192.168.83.54:5432/tcook">
> <ARG TYPE="java.lang.String" VALUE="jdbc/WebFootDB">
> <ARG TYPE="java.lang.String" VALUE="org.postgresql.Driver">
> <ARG TYPE="java.lang.String" VALUE="tcook">
> <ARG TYPE="java.lang.String" VALUE="tcook">
> </MLET>
>
> <MLET CODE="com.lisasoft.core.sql.keygen.PostgresKeyManagerImpl"
> ARCHIVE="jboss.jar,lisacore.jar"
> CODEBASE="../lib/ext/">
> <ARG TYPE="java.lang.String" VALUE="keymanager">
> <ARG TYPE="java.lang.String" VALUE="jdbc/WebFootDB">
> </MLET>
>
> Cheers
> Tom
>




--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to