Skip to content

Instantly share code, notes, and snippets.

@soapplied
soapplied / gist:5876944
Created June 27, 2013 14:37
Get All SIBMessagingEngine
final ObjectName sibMes = new ObjectName(
"WebSphere:type=SIBMessagingEngine,*");
final Set sibMesSet = server.queryNames(sibMes, null);
@soapplied
soapplied / gist:5876889
Created June 27, 2013 14:30
MBeanFactory example
final MBeanFactory mbfactory = AdminServiceFactory.getMBeanFactory();
final MBeanServer server = mbfactory.getMBeanServer();
@soapplied
soapplied / gist:5876788
Last active December 19, 2015 01:38
AdminClient connect
Properties props = new Properties();
props.put(AdminClient.CONNECTOR_TYPE,AdminClient.CONNECTOR_TYPE_SOAP);
props.put(AdminClient.CONNECTOR_HOST, hostname);
props.put(AdminClient.CONNECTOR_PORT, port);
props.put(AdminClient.USERNAME, username);
props.put(AdminClient.PASSWORD, password);
props.put(AdminClient.CONNECTOR_SECURITY_ENABLED, "true");
props.put("javax.net.ssl.trustStore", trustStoreLocation);
props.put("javax.net.ssl.trustStoreType", "JKS");
props.put("javax.net.ssl.keyStore", keyStoreLocation);
@soapplied
soapplied / gist:5876766
Created June 27, 2013 14:15
distributed transaction exception
com.microsoft.sqlserver.jdbc.SQLServerException: The operation could not be
performed because OLE DB provider "SQLNCLI10" for linked server "TEST-DB" was
unable to begin a distributed transaction.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(Unknown Source)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown Source)
@soapplied
soapplied / gist:5867202
Last active December 19, 2015 00:09
SIB queues message details
private static void getAllQueuesInfo() {
try
{
final ObjectName sibMes = new ObjectName(
"WebSphere:type=SIBMessagingEngine,*");
final Set sibMesSet = AdminClient.queryNames(sibMes, null);
for (Iterator i = sibMesSet.iterator(); i.hasNext();) {
final ObjectName meObj = (ObjectName) i.next();
final String meName = meObj.getKeyProperty("name");
final ObjectName queuePoints = new ObjectName(
@Override
public void executeQuery() {
logger.info("executeQuery()... "+getQuery());
super.executeQuery();
logger.info("executeQuery()... completed: "+getFetchedRowCount());
}