How to connect and send data to MQ with java - java

I've run ActiveMQ in my machine (imqbrokerd.exe) and got below details. I've hidden my machine name with
[#|2015-10-01T19:16:06.788+0530|WARNING|5.1|imq.log.Logger|_ThreadID=1;_ThreadNa
me=main;|[S2004]: Log output channel com.sun.messaging.jmq.util.log.SysLogHandle
r is disabled: no imqutil in java.library.path|#]
[#|2015-10-01T19:16:06.804+0530|FORCE|5.1|imq.log.Logger|_ThreadID=1;_ThreadName
=main;|
================================================================================
Message Queue 5.1
Oracle
Version: 5.1 (Build 9-b)
Compile: July 29 2014 1229
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
================================================================================
Java Runtime: 1.7.0_40 Oracle Corporation C:\Program Files (x86)\Java\jre7
|#]
[#|2015-10-01T19:16:06.819+0530|FORCE|5.1|imq.log.Logger|_ThreadID=1;_ThreadName
=main;| IMQ_HOME=C:\MessageQueue5.1\mq
|#]
[#|2015-10-01T19:16:06.819+0530|FORCE|5.1|imq.log.Logger|_ThreadID=1;_ThreadName
=main;|IMQ_VARHOME=C:\MessageQueue5.1\var\mq
|#]
[#|2015-10-01T19:16:06.819+0530|FORCE|5.1|imq.log.Logger|_ThreadID=1;_ThreadName
=main;|Windows 7 6.1 x86 <MachineName> (4 cpu)
|#]
[#|2015-10-01T19:16:06.835+0530|FORCE|5.1|imq.log.Logger|_ThreadID=1;_ThreadName
=main;|Java Heap Size: max=190080k, current=15872k
|#]
[#|2015-10-01T19:16:06.835+0530|FORCE|5.1|imq.log.Logger|_ThreadID=1;_ThreadName
=main;|Arguments:
|#]
[#|2015-10-01T19:16:06.850+0530|FORCE|5.1|imq.log.Logger|_ThreadID=1;_ThreadName
=main;|[B1060]: Loading persistent data...
|#]
[#|2015-10-01T19:16:06.866+0530|FORCE|5.1|imq.log.Logger|_ThreadID=1;_ThreadName
=main;|Using built-in file-based persistent store: C:\MessageQueue5.1\var\mq\ins
tances\imqbroker\
|#]
[#|2015-10-01T19:16:07.194+0530|FORCE|5.1|imq.log.Logger|_ThreadID=1;_ThreadName
=main;|[B1270]: Processing messages from transaction log file...
|#]
[#|2015-10-01T19:16:07.396+0530|FORCE|5.1|imq.log.Logger|_ThreadID=1;_ThreadName
=main;|[B1039]: Broker "imqbroker#<MachineName>:7676"
ready.
|#]
And I'm using below java program to connect to this queue.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Hashtable;
import javax.jms.*;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class QueueSendLinear {
public static void main(String args[]) throws JMSException, NamingException {
// Defines the JNDI context factory.
final String JNDI_FACTORY="weblogic.jndi.WLInitialContextFactory";
// Defines the JMS context factory.
final String JMS_FACTORY="jms/TestConnectionFactory";
// Defines the queue.
final String QUEUE="jms/TestJMSQueue";
QueueConnectionFactory qconFactory;
QueueConnection qcon;
QueueSession qsession;
QueueSender qsender;
Queue queue;
TextMessage msg;
String xml = "Sample XML comes here!! ";
String url = "t3://<MachineName>:7676";
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
env.put(Context.PROVIDER_URL, url);
InitialContext ic = new InitialContext(env);
qconFactory = (QueueConnectionFactory) ic.lookup(JMS_FACTORY);
qcon = qconFactory.createQueueConnection();
qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
queue = (Queue) ic.lookup(QUEUE);
qsender = qsession.createSender(queue);
msg = qsession.createTextMessage();
qcon.start();
msg.setText(xml);
qsender.send(msg);
qsender.close();
qsession.close();
qcon.close();
}
}
question here...
a. What should be the values in JNDI_FACTORY, JMS_FACTORY, QUEUE, url and what do they signify?
b. What does 't3://' in url means? Is this a protocol ? if so, what should be given for active MQ?
FYI, i'm getting below error
Oct 01, 2015 7:20:58 PM com.sun.corba.se.impl.naming.namingutil.CorbalocURL badAddress
WARNING: "IOP00110603: (BAD_PARAM) Bad host address in -ORBInitDef"
org.omg.CORBA.BAD_PARAM: vmcid: SUN minor code: 603 completed: No
[UPDATE #1]:
When I use below code, I get below error. I've attached images of my activeMQ queue details. I know that the URL that i'm using is wrong. Can you please help me out with the right one?
Exception in thread "main" javax.naming.NamingException: Couldn't connect to the specified host : [Root exception is org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 208 completed: Maybe]
at weblogic.corba.j2ee.naming.Utils.wrapNamingException(Utils.java:83)
at weblogic.corba.j2ee.naming.ORBHelper.getORBReferenceWithRetry(ORBHelper.java:656)
final String JNDI_FACTORY="weblogic.jndi.WLInitialContextFactory";
final String JMS_FACTORY="jms/?";
final String QUEUE = "mq.sys.dmq";
QueueConnectionFactory qconFactory;
QueueConnection qcon;
QueueSession qsession;
QueueSender qsender;
Queue queue;
TextMessage msg;
String xml = "Sample XML comes here!! ";
String url = "t3://localhost:51010";
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
env.put(Context.PROVIDER_URL, url);
InitialContext ic = new InitialContext(env);
qconFactory = (QueueConnectionFactory) ic.lookup(JMS_FACTORY);
qcon = qconFactory.createQueueConnection();
qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
queue = (Queue) ic.lookup(QUEUE);
qsender = qsession.createSender(queue);
msg = qsession.createTextMessage();
qcon.start();

Hope this Helps..
I have passed the JMS server name as an argument. And WLS library jar should be imported
private static final String CONNECTION_FACTORY_NAME ="connection factory name goes here";
private static final String TOPIC_NAME = "Topic Name goes here";
private static final String SERVER_URL_PREFIX = "t3://";
private static final String SERVER_URL_SUFFIX = ".url.com:port";
private static final String USER = "";
private static final String PASSWORD = "";
private static final String LOCAL_DIRECTORY = "C:\\tmp\\poslog\\";
public static void main(String args[]) throws JMSException,
NamingException, IOException, InterruptedException {
System.out.println("start" + new Date());
// INITIALIZE
System.out.println("creating context for " + args[0]);
Hashtable<String, String> properties = new Hashtable<String, String>();
properties.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
properties.put(Context.PROVIDER_URL, SERVER_URL_PREFIX + args[0] + SERVER_URL_SUFFIX);
//properties.put(Context.SECURITY_PRINCIPAL, USER);
//properties.put(Context.SECURITY_CREDENTIALS, PASSWORD);
InitialContext ctx = new InitialContext(properties);
TopicConnectionFactory connectionFactory = (TopicConnectionFactory) ctx
.lookup(CONNECTION_FACTORY_NAME);
TopicConnection connection = connectionFactory.createTopicConnection();
TopicSession session = connection.createTopicSession(false, 0);
Topic topic = (Topic) ctx.lookup(TOPIC_NAME);
TopicPublisher sender = session.createPublisher(topic);

JNDI_FACTORY is more like a driver that you want to use to connect, they are usually specific to the vendor in your case is weblogic and is pre-defined.
JMS_FACTORY is the connection factory that you have already predefined in web logic for this type of integration. it is responsible for managing the connections to the queue.
QUEUE also is something that you need to predefine / setup on weblogic admin console. It is the reference to the queues that reside on weblogic which you have setup before hand.
t3 is the connection type you are using, the other alternative could be iiop. t3 it is a more lightweight type of connection.

Related

How to get the SSLHostConfig?

I am able to get the parent Connector with
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
QueryExp qe = Query.match(Query.attr("port"), Query.value("443"));
ObjectName on = new ObjectName("*:type=Connector,*");
Set<ObjectName> objectNames = mbs.queryNames(on, qe);
and I don't want to read server.xml in case it is out of sync.
How is one to get the SSLHostConfig ?
The Connector MBean does not contain information on the TLS configuration. You need to call the method findSslHostConfigs on a bean of type=ThreadPool. ThreadPool is actually a misnomer, since this MBean is exported by each ProtocolHandler.
final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
final QueryExp qe = Query.eq(Query.attr("port"), Query.value(443));
final ObjectName on = new ObjectName("*:type=ThreadPool,*");
final Set<ObjectName> protocols = mbs.queryNames(on, qe);
for (final ObjectName protocol : protocols) {
SSLHostConfig[] configs = (SSLHostConfig[]) mbs.invoke(protocol, "findSslHostConfigs", null, null);
// do something with the SSLHostConfig
}
Alternatively the SSLHostConfigs are available as MBeans too: they have the property type=SSLHostConfig.

Can't send a message to queue on WIldfly 11

I am having this small message producer:
public static void main(String[] args) throws Exception {
BasicConfigurator.configure();
Properties env = new Properties();
InputStream is = Producer.class.getResourceAsStream("/jms.properties");
env.load(is);
Context context = new InitialContext(env);
ConnectionFactory factory = (ConnectionFactory) context.lookup("jms/RemoteConnectionFactory");
Destination queue = (Destination) context.lookup("jms/demoQueue");
JMSContext jmsContext = factory.createContext();
jmsContext.createProducer().send(queue, "Message");
}
Using the following properties:
java.naming.factory.initial = org.wildfly.naming.client.WildFlyInitialContextFactory
java.naming.provider.url = http-remoting://localhost:8080
java.naming.security.principal = alex
java.naming.security.credentials = password
messagingProvider = demo
connectionFactoryNames = QueueFactory
queue.queueReq = jms.queueReq
queue.queueResp = jms.queueResp
But I get an exception:
"Caused by: javax.jms.JMSSecurityException: AMQ119031: Unable to
validate user"
I believe I have misconfigured something on the server. But what exactly? Security settings have pattern: # with role guest and admin. I don't see anything else related to security
Call the overloaded createContext() method with 2 arguments:
JMSContext context = factory.createContext("alex", "password");
Then it should work if the "alex" user has correct role assigned.
I remember I had a discussion with developers about how the createContext() should work (it was in relation with Elytron - the new securtity subsystem), and the decission for now was like: It works as designed, but it can be enhanced in the future.
See comments in JBEAP-10527 for details.

OverlappingFileLockException in tomcat start-up

I'v added custom jndi-resource factory to my tomcat (jndi-resource for ConnectionFactory of an embedded hornetq). My resource needs some config files; I put them in ${catalina_home}/hornetq folder. I have a test-web-app that uses this resource in tomcat start-up. In tomcat start-up, When test-web-app wants to use my resource, the resource wants to lock config files but it can't, and it throws `OverlappingFileLockException:
java.nio.channels.OverlappingFileLockException
at sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255)
at sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152)
at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1056)
at org.hornetq.core.server.impl.FileLockNodeManager.tryLock(FileLockNodeManager.java:266)
at org.hornetq.core.server.impl.FileLockNodeManager.isBackupLive(FileLockNodeManager.java:82)
at org.hornetq.core.server.impl.HornetQServerImpl$SharedStoreLiveActivation.run(HornetQServerImpl.java:2161)
at org.hornetq.core.server.impl.HornetQServerImpl.start(HornetQServerImpl.java:450)
at org.hornetq.jms.server.impl.JMSServerManagerImpl.start(JMSServerManagerImpl.java:485)
at org.hornetq.jms.server.embedded.EmbeddedJMS.start(EmbeddedJMS.java:115)
at ...
Is it possible to disable file locking (files in ${catalina_home}/hornetq directory) in tomcat or OS?
Update:
My jndi-resource in context.xml file in tomcat (A connection factory with name: /ConnectionFactory is defined in hornetq-jms.xml):
<Resource name="jms/ConnectionFactory" auth="Container"
type="javax.jms.ConnectionFactory"
factory="com.wise.jms.hornetq.embedded.HornetqConnectionFactoryBuilder"
cf-name="/ConnectionFactory" singletone="true"/>
My factory class: HornetqConnectionFactoryBuilder. I put the jar containing this class in ${catalina_home}/lib directory (The embedded hornetq will be started in the first getObjectInstance method call):
public class HornetqConnectionFactoryBuilder implements ObjectFactory{
private EmbeddedJMS embeddedJMS;
private static final String ConnectionFactoryName = "cf-name";
private static final String HornetqConfigDirectoryPath = getCatalinaHomePath() + "/conf/hornetq/";
private static final String JmsConfigFilePath = HornetqConfigDirectoryPath + "hornetq-jms.xml";
private static final String HornetqConfigFilePath = HornetqConfigDirectoryPath + "hornetq-configuration.xml";
#Override
public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) throws Exception{
Properties properties = initProperties((Reference) obj);
validateProperties(properties);
initHornetq();
String connectionFactoryJndiName = (String) properties.get(ConnectionFactoryName);
return embeddedJMS.lookup(connectionFactoryJndiName);
}
private synchronized void initHornetq() throws Exception{
if (embeddedJMS == null){
embeddedJMS = new EmbeddedJMS();
embeddedJMS.setJmsConfigResourcePath(JmsConfigFilePath);
embeddedJMS.setConfigResourcePath(HornetqConfigFilePath);
embeddedJMS.start();
}
}
private Properties initProperties(Reference reference) throws IOException{
Enumeration<RefAddr> addresses = reference.getAll();
Properties properties = new Properties();
while (addresses.hasMoreElements()) {
RefAddr address = addresses.nextElement();
String type = address.getType();
String value = (String) address.getContent();
properties.put(type, value);
}
return properties;
}
private void validateProperties(Properties properties){
validateSingleProperty(properties, ConnectionFactoryName);
}
private static String getCatalinaHomePath(){
String catalinaHome = System.getenv("CATALINA_HOME");
if (catalinaHome == null){
throw new IllegalArgumentException("CATALINA_HOME environment variable should be set");
}
return "file:///" + catalinaHome.replaceAll("\\\\", "/");
}
private static void validateSingleProperty(Properties properties, String propertyName){
if (!properties.containsKey(propertyName)){
throw new IllegalArgumentException(propertyName + " property should be set.");
}
}
}
My test-web-app Test Class (test method will be lunch in test-web-app start-up):
public class Test{
private ConnectionFactory connectionFactory;
public Test() throws NamingException{
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
connectionFactory = (ConnectionFactory) envCtx.lookup("jms/ConnectionFactory");
}
public void test() throws JMSException{
Connection connection = connectionFactory.createConnection();
connection.start();
Session session = connection.createSession(true,Session.SESSION_TRANSACTED);
Queue queue = session.createQueue("testQueue");
MessageProducer messageProducer = session.createProducer(queue);
MessageConsumer messageConsumer = session.createConsumer(queue);
TextMessage message1 = session.createTextMessage("This is a text message1");
messageProducer.send(message1);
session.commit();
TextMessage receivedMessage = (TextMessage) messageConsumer.receive(5000);
session.commit();
System.out.println("Message1 received after receive commit: " + receivedMessage.getText());
}
public void setConnectionFactory(ConnectionFactory connectionFactory){
this.connectionFactory = connectionFactory;
}
}
Note: when i put (hornetq) config files in the jar class-path, i have no problem and everything is fine!! (tomcat: 6, hornetq: 2.4.0.Final, OS: windows 7)
Do you have other deployments in the Tomcat?
There is very well chance that once you restart tomcat, some other project gets deployed first which uses the file in the lib folder.
Try deploying it in a fresh tomcat installation or remove other folders from the webapps folder in Tomcat.

Weblogic ConnectionFactory Lookup from Java Client

I'm trying to enqueue a message on a jms queue (weblogic) from a java application.
InitialContext ctx = getInitialContext();
qconFactory = (QueueConnectionFactory)ctx.lookup("jms.bfred1cf");
qcon = qconFactory.createQueueConnection();
qsession = qcon.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
queue = (Queue) ctx.lookup("jms.bfred1queue");
private static InitialContext getInitialContext() throws NamingException {
Hashtable<String, String> env = new Hashtable<String, String>();
env.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
env.put(Context.PROVIDER_URL, "t3://soabpm-vm:7001/");
return new InitialContext(env);
}
When i invoke the getInitalContext() methos it works fine. I got the context.
But when trying to get the connection factory, using the context, it gives the following error:
<Exception in thread "main" java.lang.AbstractMethodError: weblogic.rmi.internal.RMIEnvironment.getProperties(Ljava/lang/Object;)Ljava/util/Hashtable;
at weblogic.rjvm.ResponseImpl.getRMIClientTimeout(ResponseImpl.java:281)
at weblogic.rjvm.ResponseImpl.<init>(ResponseImpl.java:42)
at weblogic.rjvm.MsgAbbrevOutputStream.sendRecv(MsgAbbrevOutputStream.java:404)
at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:109)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:345)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
at weblogic.jndi.internal.ServerNamingNode_1035_WLStub.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:423)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)
at javax.naming.InitialContext.lookup(InitialContext.java:409)
at demo.Demo.main(Unknown Source)
Looking into Weblogic console, JNDI Tree I've the following:
JMS:
ConnectionFactory:
name: bfred1cf
className: weblogic.rmi.cluster.ClusterableRemoteObjec
Binding Name: jms.bfred1cf
Class: weblogic.jms.client.JMSXAConnectionFactory
Queue
name: bfred1queue
className: weblogic.jms.common.WrappedDestinationImpl
Binding Name: jms.bfred1queue
Class: weblogic.jms.common.DestinationImpl
If i try to enqueue a message from a SOA Suite project (BPEL) with a JMS Adapter, using the Outbound Conection Pool
(eis/jms/bfre1) configured for the CF it works fine.
Does anyone have an idea about what can cause this error?
Thanks,
Fabio
Try to use:
wlthint3client.jar
instead of wlclient.jar and wljmsclient.jar

Fatal Exception re WAS AdminClient

I'm attempting to monitor a Websphere 7 ennvironment using MBeans, but running into numerous problems. First, I receive the following exception when using the code posted below:
com.ibm.websphere.management.exception.ConnectorException: Could not
create RMI Connector to connect to host localhost at port 2809
Here is the code generating the exception:
import java.util.Properties;
import com.ibm.websphere.management.AdminClient;
import com.ibm.websphere.management.AdminClientFactory;
public class JustAdminClient {
private AdminClient adminClient;
private void initialize() throws Exception {
try {
// Initialize the AdminClient.
Properties adminProps = new Properties();
adminProps.setProperty("type", AdminClient.CONNECTOR_TYPE_RMI);
adminProps.setProperty(AdminClient.CONNECTOR_SECURITY_ENABLED, "false");
adminProps.setProperty(AdminClient.CONNECTOR_HOST, "localhost");
adminProps.setProperty(AdminClient.CONNECTOR_PORT, "2809");
adminClient = AdminClientFactory.createAdminClient(adminProps);
} catch (Exception ex) {
ex.printStackTrace(System.out);
throw ex;
}
} // end method
/**
* #param args
*/
public static void main(String[] args) {
JustAdminClient adClient = new JustAdminClient();
try {
adClient.initialize();
} catch (Exception e) {
e.printStackTrace();
}
} // end main
} // end class
Second, I'm running WAS standalone with security disabled. Do I need to configure any self-signed certs?
My security.xml shows:
<security:Security xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
xmlns:orb.securityprotocol="http://www.ibm.com/websphere/appserver/schemas/5.0/orb.securityprotocol.xmi"
xmlns:security="http://www.ibm.com/websphere/appserver/schemas/5.0/security.xmi" xmi:id="Security_1"
useLocalSecurityServer="true" useDomainQualifiedUserNames="false"
issuePermissionWarning="true" activeProtocol="BOTH"
enforceJava2Security="false" enforceFineGrainedJCASecurity="false"
appEnabled="true" dynamicallyUpdateSSLConfig="true"
allowBasicAuth="true" activeAuthMechanism="LTPA_1"
activeUserRegistry="LocalOSUserRegistry" enabled="false" cacheTimeout="600"
defaultSSLSettings="SSLConfig_RXCW510MONNode01_1" adminPreferredAuthMech="RSAToken_1">
per the link: http://www-01.ibm.com/support/docview.wss?uid=swg21295051
Note, I can contact port 2809 two ways, via WSadamin and a Java prog containing the following:
private void connect(String host,String port) throws Exception
{
String jndiPath="/WsnAdminNameService#JMXConnector";
JMXServiceURL url = new JMXServiceURL("service:jmx:iiop://"+host+"/jndi/corbaname:iiop:"+host+":"+port+jndiPath);
System.out.println("URL = " + url);
//JMXServiceURL url = new JMXServiceURL("service:jmx:iiop://192.168.0.175:9100/jndi/JMXConnector");
Hashtable h = new Hashtable();
//Specify the user ID and password for the server if security is enabled on server.
//Establish the JMX connection.
System.out.println("Before JMXConnector");
JMXConnector jmxc = JMXConnectorFactory.connect(url, h);
//Get the MBean server connection instance.
System.out.println("Before getMBeanServerConnection");
mbsc = jmxc.getMBeanServerConnection();
System.out.println("Connected to Application Server");
} // end method
Any ideas? I'm lost and apologize for the long thread, but better to see the info upfront.
Resolved my problem using the follwoing example code snippet and notations. Note, pay particular attention to thrown exception and messages re: mssing classes; i.e. focusing on the message "could not create" message may mislead you
requires the following jar files:
%WAS_HOME%\runtimes\com.ibm.jaxws.thinclient_7.0.0.jar
%WAS_HOME%\plugins\com.ibm.ws.runtime.jar
%WAS_HOME%\plugins\deploytool\itp\com.ibm.websphere.v7_7.0.0.v20080817\wasJars\com.ibm.ws.admin.core.jar
%WAS_HOME%\runtimes\com.ibm.ws.admin.client_7.0.0.jar requires
CONNECTOR_TYPE_SOAP. CONNECTOR_TYPE_RMI fails to connect; maybe a jar issue based on the stack trace messages
public class JMXAdminClientSimple {
`private AdminClient adminClient;
private ObjectName nodeagent = null;
public void initialize() throws Exception {
try {
// Initialize the AdminClient.
Properties props = new Properties();
props.setProperty(AdminClient.CONNECTOR_HOST, "localhost");
props.setProperty(AdminClient.CONNECTOR_PORT, "8880");
props.setProperty(AdminClient.CONNECTOR_TYPE, AdminClient.CONNECTOR_TYPE_SOAP);
props.setProperty(AdminClient.CONNECTOR_SECURITY_ENABLED, "false");
props.setProperty(AdminClient.USERNAME, "");
props.setProperty(AdminClient.PASSWORD, "");
adminClient = AdminClientFactory.createAdminClient(props);
} catch (Exception ex) {
ex.printStackTrace(System.out);
throw ex;
}
}`
To use the AdminClient API with security disabled on a Sun/Oracle JRE, you need the following JARs in the classpath:
runtimes/com.ibm.ws.admin.client_7.0.0.jar
runtimes/com.ibm.ws.ejb.thinclient_7.0.0.jar
runtimes/com.ibm.ws.orb_7.0.0.jar
With these JARs, RMI should also work.

Categories

Resources