[JBoss/Spring Integration] - JBOSS+SPRING+IBATIS [CachedConnectionManager] Closing a conn
by anthonyhong
I use jboss4.0.2+spring1.2.8+ibatis2.x+Oracle10g
I configured an xa datasource in jboss, everthing configured fine and startup without errors.
But when request a function with db operation. Functions work fine but jboss has shown following errors:
20:46:01,687 INFO [CachedConnectionManager] Closing a connection for you. Plea
se close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@ 4b2f7f
java.lang.Exception: STACKTRACE
at org.jboss.resource.connectionmanager.CachedConnect ionManager.register
Connection(CachedConnectionManager.java:321)
at org.jboss.resource.connectionmanager.BaseConnectio nManager2.allocateC
onnection(BaseConnectionManager2.java:467)
at org.jboss.resource.connectionmanager.BaseConnectio nManager2$Connectio
nManagerProxy.allocateConnection(BaseConnectionMan ager2.java:874)
at org.jboss.resource.adapter.jdbc.WrapperDataSource. getConnection(Wrapp
erDataSource.java:103)
at org.springframework.jdbc.datasource.DataSourceUtil s.doGetConnection(D
ataSourceUtils.java:112)
at org.springframework.jdbc.datasource.TransactionAwa reDataSourceProxy.g
etConnection(TransactionAwareDataSourceProxy.java: 107)
at org.springframework.jdbc.datasource.DataSourceUtil s.doGetConnection(D
ataSourceUtils.java:112)
at org.springframework.jdbc.datasource.DataSourceUtil s.getConnection(Dat
aSourceUtils.java:77)
at org.springframework.orm.ibatis.SqlMapClientTemplat e.execute(SqlMapCli
entTemplate.java:165)
at org.springframework.orm.ibatis.SqlMapClientTemplat e.insert(SqlMapClie
ntTemplate.java:303)
at com.iBatisDaoBase.insert(iBatisDaoBase.java:22)
at com.MyDaoImpl.createData(MyDaoImpl.java:10)
at com.MyServiceImpl.createData(MyServiceImpl.java:18 )
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflecti
on(AopUtils.java:287)
at org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJo
inpoint(ReflectiveMethodInvocation.java:181)
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(
ReflectiveMethodInvocation.java:148)
at org.springframework.transaction.interceptor.Transa ctionInterceptor.in
voke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(
ReflectiveMethodInvocation.java:170)
at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynami
cAopProxy.java:176)
at $Proxy406.createData(Unknown Source)
I saw there are some discussion on hibernate + spring run on jboss to contol the connection close on each transaction. how to configure with ibatis?
Thanks a lot!!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008576#4008576
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008576
19 years, 2 months
[EJB 3.0] - Not able to create durable subscription in MDB
by alllle
I am using JBoss 4.04GA SP2 and JBoss Messaging 1.0.2SP2.
I want to create a MDB in EJB3 that creates durable subscription to a topic. Since the topic requires a valid user/pass, EJB3 annotation along was not sufficient. I therefore, created the ejb-jar.xml and jboss.xml file that are packaged with my Jar file, which is deployed inside an EAR.
I got the following error when deploying the EAR:
| 17:48:46,234 WARN mdb.MDB - JMS provider failure detected:
| javax.jms.JMSException: Cannot create durable subscriber without a valid client ID
| at org.jboss.jms.server.endpoint.ServerSessionEndpoint.createConsumerDelegate(ServerSessionE
| ndpoint.java:190)
| at org.jboss.jms.server.endpoint.advised.SessionAdvised.org$jboss$jms$server$endpoint$advise
| d$SessionAdvised$createConsumerDelegate$aop(SessionAdvised.java:90)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
|
But I have already put in the client id as well as the subscription id in the jboss.xml file. Here is the content:
<?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE jboss PUBLIC
| "-//JBoss//DTD JBOSS 4.0//EN"
| "http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
| <jboss>
| <enterprise-beans>
| <message-driven>
| <ejb-name>notificationMDB</ejb-name>
| <destination-jndi-name>topic/Update</destination-jndi-name>
| <mdb-user>user</mdb-user>
| <mdb-passwd>pass</mdb-passwd>
| <mdb-client-id>MyDurableSub</mdb-client-id>
| <mdb-subscription-id>mdb</mdb-subscription-id>
| <configuration-name>Standard Message Driven Bean</configuration-name>
| </message-driven>
| </enterprise-beans>
| </jboss>
And the ejb-jar.xml file:
<?xml version='1.0' encoding='UTF-8' ?>
|
| <ejb-jar>
| <enterprise-beans>
| <message-driven>
| <ejb-name>notificationMDB</ejb-name>
| <ejb-class>com.company.ejb.NotificationMDB</ejb-class>
| <transaction-type>Container</transaction-type>
| <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
| <message-driven-destination>
| <destination-type>javax.jms.Topic</destination-type>
| <subscription-durability>Durable</subscription-durability>
| </message-driven-destination>
| </message-driven>
| </enterprise-beans>
| </ejb-jar>
I've also stripped out all EJB3 annotations from the NotificationMDB class. When debug into the JBoss code, the code where the error was thrown is:
String clientID = connectionEndpoint.getClientID();
| if (clientID == null)
| {
| throw new JMSException("Cannot create durable subscriber without a valid client ID");
| }
|
| subscription = cm.getDurableSubscription(clientID, subscriptionName, ms, pm, mm);
|
because the clientID is null. Inspecting the stack tree, I saw the mdb-user and mdb-password are read correctly. I don't know where the client-id and subscription-id are stored. The value of the subscriptionName passed into the above method is set to string "subscriptionName".
Can anyone help? Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008571#4008571
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008571
19 years, 2 months
[Security & JAAS/JBoss] - problem securing jsf pages
by damatrix
Hi,
I followed the instructions in the book "JBoss at Work" to set up my own customer login-config.xml file and the login-config-service.xml files respectively. I've also generated a keystore file and there seems to be no problems from these sides (i think). Bcos my certificate is self-signed, i do get the usual message about unsafe certificate.
However the problem is that once i accept the certificate by clicking ok, my browser attempts to DOWNLOAD instead of DISPLAY the default login page i assigned in web.xml. This happens in Firefox and Mozilla, whiles IE just gives me an error message.
Any ideas on what i'm doing wrong? By the way the protected recource is a jsf page if that's any help. I've tried both /trade/* and *.trade as my url-patterns to no effect. I'm using Seam 1.1.0.GA, Facelets and JBoss 4.0.5.GA.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008567#4008567
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008567
19 years, 2 months
[JBoss Seam] - Re: Confused about Seam/JSF/Facelets Tools - Seeking some Gu
by svadu
"kukeltje" wrote : The exadel plugin is less usable with seam since
| - it does not know about the annotations and therefor has no codecompletion, validation
|
I do have code completion and validation (as well as recognision of annotations). Although I have MyEclipse installed next to exadel which can be the reason why I have it.
"kukeltje" wrote :
| - does not know how to visually display seam tags
| - ...
|
True, this problem exist. Although I don't have much troubles with it.
"kukeltje" wrote :
| Since I do not use jsf pageflow with seam (jpdl) and therefore this plugin becomes less and less usable.
|
Are you using only pages.xml? That's interesting as JBoss guys (I think it was Gavin) said that pages.xml is normally used for wizards, so I guess you must have pretty specific application.
"kukeltje" wrote :
| I personally am looking into Taylor at the moment (http://taylor.sf.net) in addition to exadel. This guy is doing some nice work I think
Yep that one looks interesting.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008564#4008564
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008564
19 years, 2 months