Lukket

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.

}

Thanks

Evner: J2EE, Java, Javascript, Linux, Software Arkitektur

Se mere: 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

Om arbejdsgiveren:
( 0 bedømmelser ) San Diego, United States

Projekt ID: #15503112

4 freelancere byder i gennemsnit $28 på dette job

tgchauhan1711

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 Flere

$30 USD på 1 dag
(11 bedømmelser)
4.2
panjvirsingh

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 Flere

$30 USD på 1 dag
(12 bedømmelser)
3.6
hongyuwang76

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 Flere

$25 USD in 10 dage
(0 bedømmelser)
0.0
datotahost

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 Flere

$25 USD på 1 dag
(0 bedømmelser)
0.0