[Messaging, JMS & JBossMQ] - JMSSecurityException when trying to subscribe to a temporary
by hicks
Hi,
I'm using QueueSession.createTemporaryQueue() and trying to receive messages from this queue. However I'm getting a JMSSecurityException (shown below) at the point where I create a JMS receiver
I know that the jbossmq-destinations-service.xml file is used to setup permissions for individual queues, however my question is, how can I configure the permissions dynamically for my temporary queue?
javax.jms.JMSSecurityException: Connection not authorized to subscribe to destination: JMS_TQ34
at org.jboss.mq.security.ServerSecurityInterceptor.subscribe(ServerSecurityInterceptor.java:141)
at org.jboss.mq.server.TracingInterceptor.subscribe(TracingInterceptor.java:816)
at org.jboss.mq.server.JMSServerInvoker.subscribe(JMSServerInvoker.java:297)
at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:160)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:356)
at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068213#4068213
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4068213
18Â years, 9Â months
[Persistence, JBoss/CMP, Hibernate, Database] - How to support JTA Transaction in tomcat for JBoss cache
by umarzubair1
I am using hibernate. I am looking to use JTA Transaction because i want to use JBoss tree cache for cluster environment. My hibernate.cfg.xml files contains
<session-factory>
java:comp/env/MykDS
<!-- SQL dialect -->
org.hibernate.dialect.MySQLDialect
org.hibernate.transaction.JTATransactionFactory
java:comp/UserTransaction
org.hibernate.transaction.JBossTransactionManagerLookup
</session-factory>
MyDS is defined in config/server.xml by
< Resource
name="MyDS" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="root" password="root" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/mydb"
removeAbandoned="true"
removeAbandonedTimeout="600"
logAbandoned="true"/>
When I start to tomcat, I am facing following exception.
How can we use JTATransactions in tomcat.
141640 [http-8080-Processor25] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].
/Administration].[Faces Servlet] - Servlet.service() for servlet Faces Servlet threw exception%jav
x.naming.NameNotFoundException: Name TransactionManager is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:769)
at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:136)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.hibernate.transaction.JNDITransactionManagerLookup.getTransactionManager(JNDITransac
ionManagerLookup.java:23)
at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:325)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.ja
a:915)
at com.mw.framework.util.HibernateUtil.(HibernateUtil.java:37)
Thanks in advance
Umar
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068206#4068206
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4068206
18Â years, 9Â months