Getting ActiveMQ value using JNDI lookup on JBOSS server with out the use Spring Frame Work. Have to use Pure Java EE configuration something like using annotations.

I have a Rest API which was developed to run on JBoss server, and have to post the Payload to the ActiveMQ. The Active MQ is Value is JNDI set up and we have to get that object which has a activeMQ end point. By using that we have to post the payload to that Active MQ.

I am posting my code here , but in this I hard coded the ActiveMqServers. This is not the right way. we have to look up JNDI get the ActiveMq server. As far as I know Jboss has a feature when we lookup the JNDI value it will give the ActiveMq which is presently available. Please reach someone who has good experience on this.

private boolean postGradesToActiveMq(GradesRequestVo requestVo, ResponseVo response) throws Exception {

Context initContext = new InitialContext();

//String ActiveMQServers = [url removed, login to view]("java:/act/CCES/url/ActiveMQURL3").toString();

String Huburl = "[url removed, login to view]";

String ActiveMQServers = "[url removed, login to view]://[url removed, login to view]://[url removed, login to view]";

List<String> servers = [url removed, login to view]([url removed, login to view]("\\?"));

for (String server : servers) {

try {

String url = [url removed, login to view]() + "/api/message?destination=queue://[url removed, login to view]";

url += "&transactionID=" + [url removed, login to view]().toString();

url += "&requestID=" + [url removed, login to view]().toString();

url += "&hubUrl=" + Huburl;

ClientRequest postRequest = new ClientRequest(url);

Timestamp timestamp = new Timestamp([url removed, login to view]());

Instant instant = [url removed, login to view]();

[url removed, login to view]("timestamp", instant);

[url removed, login to view]("application/json", response);

ClientResponse<String> clientResponse = [url removed, login to view]([url removed, login to view]);

return [url removed, login to view]() == [url removed, login to view]() ? true : false;

} catch (IOException e) {

// PASS. Try the other servers in the list before throwing an exception.

// TODO: seperate out other errors from the case when the server is offline.



Skills: J2EE, Java, Javascript, Linux, Software Architecture

See more: activemq jndi username password, activemq jndi properties, jms jndi lookup example, org.apache.activemq.jndi.activemqinitialcontextfactory jar, activemq connection factory configuration, how to create connectionfactory in activemq, activemqinitialcontextfactory example, activemq connection factory example, i need a lawyer to help me in getting a divorce but i don t have money in lagos, getting a job in australia java developer, i have a list of 67 eminent medical people involved in sports and i would like their work email addresses they are all speakers , billing configuration program java swing, using splunk rest api java, obfuscation configuration files java, activemq ssl configuration

About the Employer:
( 0 reviews ) San Diego, United States

Project ID: #15503112

4 freelancers are bidding on average $28 for this job


Hello sir I am expert in java and j2ee and skills you mentioned. Please see my profile and skills. Please give me more details about your project. thank you Relevant Skills and Experience I have 2 year exper More

$30 USD in 1 day
(11 Reviews)

I would like to offer myself as a probable candidate for this assignment as I am confident of delivering a quality output. I have excellent expertise in this area. Relevant Skills and Experience I have total 7 years o More

$30 USD in 1 day
(12 Reviews)

Experimented java developper, i worked in large companies for several years on web technologies. Expérience et Compétences appropriées - Java 8, REST web services, various web applications - RabbitMq and Redis. - Hibe More

$25 USD in 10 days
(0 Reviews)

Hi, we will provide the java developer on spring,struts,ofbiz. we charge as per experience. 9 year exp - $20 7 year exp - $15 3 year Exp- $10 1 year Exp- $5 Relevant Skills and Experience java spring application Prop More

$25 USD in 1 day
(0 Reviews)