[Messaging, JMS & JBossMQ] - Strange Problem!!!
by vijayaraghava
Hi,
Iam sending messages to a queue(MyQueue) using JMS and MDB is consuming them. But the problem is that the MDB is not getting invoked for all messages and this doesn't happen all the time. Sometimes it works perfectly fine and sometimes it doesn't consume any messages or just consumes only some of the messages. I think the configuration is fine.
Iam using JBoss 4.0.4, EJB 3.0, JavaEE 5.0
Relevant snippets of configuration files and code are as follows:
1) jbossmq-destinations-service.xml --- added a new queue
<depends optional-attribute-name="DestinationManager">
jboss.mq:service=DestinationManager
2) Code using JMS API
context = new InitialContext();
connectionFactory =
(ConnectionFactory)context.lookup("ConnectionFactory");
destinationName = "queue/MyQueue";
Queue testExecutionQueue =
(Queue)context.lookup(destinationName);
connection = connectionFactory.createConnection();
session = connection.createSession(false,
Session.AUTO_ACKNOWLEDGE);
msgProducer = session.createProducer(testExecutionQueue);
connection.start();
ObjectMessage message = session.createObjectMessage();
message.setObject(msg);
msgProducer.send(message);
// Close the connection
3) MDB
// Only the annotations --- others are not required I guess
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName="destinationType",
propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(propertyName="destination",
propertyValue="queue/MyQueue") })
Thats it. In the JBoss configuration file, I only changed the file mentioned in 1).
The problem is strange because it happens sometimes and works perfectly at other times.
Where am I going wrong?
Thank you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979290#3979290
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979290
19 years, 8 months
Standalone client and JBoss 4.0.4.GA
by Jonathan Voxendal
Hi
I'm trying to get a standalone application to be able to access session
beans in my jboss 4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)
This is the code I'm using:
27: InitialContext ctx;
28: Properties env = new Properties();
29:
30: env.setProperty(Context.SECURITY_PRINCIPAL, "user");
31: env.setProperty(Context.SECURITY_CREDENTIALS, "password");
32: env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "
org.jboss.security.jndi.JndiLoginInitialContextFactory");
33: env.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099");
34: ctx = new InitialContext(env);
When I execute it throws the following exception:
Exception in thread "main" java.lang.ExceptionInInitializerError
at
org.jboss.security.jndi.SecurityAssociationActions$SetPrincipalInfoAction.run
(SecurityAssociationActions.java:51)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.security.jndi.SecurityAssociationActions.setPrincipalInfo(
SecurityAssociationActions.java:62)
at
org.jboss.security.jndi.JndiLoginInitialContextFactory.getInitialContext(
JndiLoginInitialContextFactory.java:79)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java
:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java
:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at Utils.main(Utils.java:34)
The last line points at "ctx = new InitialContext(env);"
If I understand things correctly this has nothing todo with what user or
password I'm using since that check isn't made
before I actually call a method on a bean.
So, is there any configuration that has be made in JBoss to allow "external"
client to access the JNDI tree?
Thanks
Jonathan
19 years, 8 months
[JBoss Portal] - Apache mod_jk1.2.19 -> JbossAS 4.0.4 -> Jboss Portal 2.4
by shagy69
Hi all,
I have configured the AJP connection between Apache and jboss and it is working ok. But I have a problem with static elements in the portal, for solving this issue I added an Alias line in the mod-jk.conf file like this:
Alias /portal-core D:/jboss-portal2.4/server/default/deploy/jboss-portal.sar/portal-core.war
Using this alias now i am able to view the default portal in my browser in the following URL: http://localhost/portal and now it is working ok (for the images, javascript, css...)
My boss said that we must move the jboss portal to another server and let apache in the fron server, so now two servers, one for apache and one for jboss. The problem is that if have tried to change the Alias pointing to D:jboss-portal2.4/... to a unc shared folder in the jboss server like this:
Alias /portal-core \\deploy/jboss-portal.sar/portal-core.war
but this is not working , so i also tried
Alias /portal-core http://server2/portal-core
but this still not works. I really don't know what is going on, so if someone with more experience than me in that kind of configs can help me, it would be very nice, thank you all. Very appreciate your work on portal 2.4 i am waiting with enthusiasm portal2.6!!
ciao ciao!!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979278#3979278
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979278
19 years, 8 months
[Installation, Configuration & Deployment] - Re: Deployment of cfusion.war on gentoo(linux) jboss
by kevin_ingen
I found out that i was wright. emerge jboss installs a version3.x instead of the version 4.0.4 of fusioncube. I installed the new version and tried a deploy again but it stil doesn' t work though.
When I try to call a coldfusion page I get this:
HTTP Status 500 -
|
| --------------------------------------------------------------------------------
|
| type Exception report
|
| message
|
| description The server encountered an internal error () that prevented it from fulfilling this request.
|
| exception
|
| java.lang.NullPointerException
| coldfusion.license.LicenseManager._isSingleIP(LicenseManager.java:171)
| coldfusion.license.LicenseManager.isSingleIP(LicenseManager.java:68)
| coldfusion.CfmServlet.getFilterChain(CfmServlet.java:66)
| coldfusion.CfmServlet.service(CfmServlet.java:103)
| coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
|
|
| note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.
|
|
I don't know what it meens, can somone help me?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979277#3979277
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979277
19 years, 8 months