Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within EJB and other Jakarta /Java EE Technologies
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
Liutauras Vilda
Jeanne Boyarsky
paul wheaton
Sheriffs:
Ron McLeod
Devaka Cooray
Henry Wong
Saloon Keepers:
Tim Holloway
Stephan van Hulst
Carey Brown
Tim Moores
Mikalai Zaikin
Bartenders:
Frits Walraven
Forum:
EJB and other Jakarta /Java EE Technologies
Jboss configuration: not getting
Azrael Noor
Ranch Hand
Posts: 385
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I am Using net beans.
(Kindly don't tell me to change the
IDE
)
Please tell me how where and what to update for setting JMS via
jboss
server.
I am not able to getting even Jboss Server's management Console Values
Please anyone help!!!
Regards
Azrael Noor
Sai Hegde
security forum advocate
Posts: 236
1
I like...
posted 13 years ago
1
Number of slices to send:
Optional 'thank-you' note:
Send
Why can't you get into the admin console? Do you see any error being thrown? Please post the error stack just in case you wanted us to help you.
Azrael Noor
Ranch Hand
Posts: 385
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I Don't know how to use admin console of JBoss
what i am doing is
Using netBeans
create jboss.jar in meta inf and put following
<?xml version="1.0" encoding="utf-8"?> <jboss xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss_5_0.xsd" version="3.0"> <enterprise-beans> <message-driven> <ejb-name>ExampleMDB</ejb-name> <destination-jndi-name>queue/testQueue</destination-jndi-name> </message-driven> </enterprise-beans> </jboss>
then created ejb.jar and one follownig:
<?xml version="1.0" encoding="UTF-8"?> <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" version="3.0"> <description>JBoss Message Driven Bean Tutorial</description> <display-name>JBoss Message Driven Bean Tutorial</display-name> <enterprise-beans> <message-driven> <ejb-name>ExampleMDB</ejb-name> <ejb-class>org.jboss.tutorial.mdb_deployment_descriptor.bean.ExampleMDB</ejb-class> <transaction-type>Bean</transaction-type> <message-destination-type>javax.jms.Queue</message-destination-type> <activation-config> <activation-config-property> <activation-config-property-name>acknowledgeMode</activation-config-property-name> <activation-config-property-value>AUTO_ACKNOWLEDGE</activation-config-property-value> </activation-config-property> </activation-config> </message-driven> </enterprise-beans> </ejb-jar>
written MDB Code as following:
package org.jboss.tutorial.mdb_deployment_descriptor.bean; import javax.ejb.MessageDriven; import javax.ejb.ActivationConfigProperty; import javax.jms.Message; import javax.jms.MessageListener; public class ExampleMDB implements MessageListener { public void onMessage(Message recvMsg) { System.out.println("----------------"); System.out.println("Received message"); System.out.println("----------------"); } }
and written following in client:
package org.jboss.tutorial.mdb_deployment_descriptor.client; import java.util.Properties; import javax.jms.Queue; import javax.jms.QueueConnection; import javax.jms.QueueConnectionFactory; import javax.jms.QueueSender; import javax.jms.QueueSession; import javax.jms.TextMessage; import javax.naming.Context; import javax.naming.InitialContext; public class Client { public static void main(String[] args) throws Exception { Context ctx; QueueConnection cnn = null; QueueSender sender = null; Properties pr = new Properties(); //pr.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory"); // pr.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces"); // pr.put("java.naming.provider.url","localhost"); pr.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); pr.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces"); pr.put(Context.PROVIDER_URL, "jnp://localhost:1099"); System.out.println("Ya"); QueueSession session = null; System.out.println(pr.getProperty("java.naming.provider.url")); ctx = new InitialContext(pr); System.out.println("vaha"); Queue queue = (Queue) ctx.lookup("queue/testQueue"); System.out.println("vaha"); QueueConnectionFactory factory = (QueueConnectionFactory) ctx.lookup("QueueConnectionFactory"); System.out.println("vaha"); cnn = factory.createQueueConnection(); session = cnn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE); System.out.println("vaha"); TextMessage msg = session.createTextMessage("Hello World"); sender = session.createSender(queue); sender.send(msg); System.out.println("Message sent successfully to remote queue."); } }
NOTHING MORE IS DONE BY ME AND when run client, it suspended
WHY ???
solve please if anyone have knowledge
Regards
Azrael Noor
Sai Hegde
security forum advocate
Posts: 236
1
I like...
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Did it print anything on the console that might be useful here?
Azrael Noor
Ranch Hand
Posts: 385
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Got The Configuration. it's easy to configure jboss or glassfish
Regards
Azrael Noor
Sai Hegde
security forum advocate
Posts: 236
1
I like...
posted 13 years ago
1
Number of slices to send:
Optional 'thank-you' note:
Send
Posting the solution would be appreciated. It could always be helpful to fellow ranchers.
I am displeased. You are no longer allowed to read this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
start jboss-4.2.2.GA in windows service
Need help on jboss cache
JavaMail + Jboss
Error While Starting JBoss 5.1.0 GA!!!
Proble with JMS Queue.
More...