RE: [JBoss-user] JBoss-net does not like calling EJB method with transaction type = never

2003-11-17 Thread Kevin Conner
 If the bean is 'never' it won't work anyway (because the calls to
 the SB with 'Required' TX attribute is done withiout a TX context).
 RequiresNew should be used in that case.

Are you not talking about mandatory?  Required will create a tx context
if one does not exist.

Kev


---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] JBoss-net does not like calling EJB method with transaction type = never

2003-11-14 Thread Yates, Danny
I would guess that what is happening is:

1) Axis starts a transaction to call your Web Services class
2) Your Web Services class (now in a transaction) tries to call the bean
3) Because the bean is marked never, the call fails

Perhaps you should consider NotSupported which will suspend the Axis
transaction whilst inside your bean. Not sure what happens if you bean
then tries to call other beans which are marked Required.

-- 
Danny Yates


-Original Message-
From: Jonathan.O'[EMAIL PROTECTED] [mailto:Jonathan.O'[EMAIL PROTECTED] 
Sent: 14 November 2003 12:51
To: [EMAIL PROTECTED]
Subject: [JBoss-user] JBoss-net does not like calling EJB method with
transaction type = never


I'm working on JBoss 3.0.8.
I am trying to call an EJB Session Bean method via SOAP/Axis. The bean 
method is marked @ejb.transaction-type = never because it calls 3 other 
session beans that handle their own transactions.

According to the stack trace, the Axis RPCProvider.invokeMethod is 
eventually trying to run with Transactions. Should it not obey the 
transaction type info from ejb-jar.xml?
Any help is appreciated.

I get the following stack trace:
javax.ejb.EJBException: Transaction not allowed
at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:330)
at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:98)
at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:13
0)
at 
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
at 
org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.jav
a:313)
at org.jboss.ejb.Container.invoke(Container.java:738)
at 
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at 
org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:99)
at 
org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
at 
org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77
)
at 
org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
at 
org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInter
ceptor.java:111)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
at $Proxy185.issueCard(Unknown Source)
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:324)
at 
org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:347
)
at 
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:2
25)
at 
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:263)
at 
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:
71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:154)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:121)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:288)
at 
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:543)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
at 
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandl
er.java:294)
at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
at 
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext
.java:507)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1664)
at org.mortbay.http.HttpServer.service(HttpServer.java:863)
at org.jboss.jetty.Jetty.service(Jetty.java:460)
at 
org.mortbay.http.HttpConnection.service(HttpConnection.java:775)
Ciao,
Jonathan O'Connor
XCOM Dublin


---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]

RE: [JBoss-user] JBoss-net does not like calling EJB method with transaction type = never

2003-11-14 Thread Jonathan . O'Connor
Danny,
Thanks NotSupported fixed it alright. But I still think that Web 
Services should not wrap everything in a transaction.
I presume that new transactions are created whenever it calls beans marked 
as required. At least my tests all run smoothly.
Ciao,
Jonathan O'Connor
XCOM Dublin




Yates, Danny [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
14.11.2003 14:06
Please respond to jboss-user
 
To: '[EMAIL PROTECTED]' 
[EMAIL PROTECTED]
cc: 
Subject:RE: [JBoss-user] JBoss-net does not like calling 
EJB method with transaction type = never


I would guess that what is happening is:

1) Axis starts a transaction to call your Web Services class
2) Your Web Services class (now in a transaction) tries to call the bean
3) Because the bean is marked never, the call fails

Perhaps you should consider NotSupported which will suspend the Axis
transaction whilst inside your bean. Not sure what happens if you bean
then tries to call other beans which are marked Required.

-- 
Danny Yates


-Original Message-
From: Jonathan.O'[EMAIL PROTECTED] [mailto:Jonathan.O'[EMAIL PROTECTED] 
Sent: 14 November 2003 12:51
To: [EMAIL PROTECTED]
Subject: [JBoss-user] JBoss-net does not like calling EJB method with
transaction type = never


I'm working on JBoss 3.0.8.
I am trying to call an EJB Session Bean method via SOAP/Axis. The bean 
method is marked @ejb.transaction-type = never because it calls 3 other 
session beans that handle their own transactions.

According to the stack trace, the Axis RPCProvider.invokeMethod is 
eventually trying to run with Transactions. Should it not obey the 
transaction type info from ejb-jar.xml?
Any help is appreciated.

I get the following stack trace:
javax.ejb.EJBException: Transaction not allowed
at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:330)
at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:98)
at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:13
0)
at 
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
at 
org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.jav
a:313)
at org.jboss.ejb.Container.invoke(Container.java:738)
at 
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at 
org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:99)
at 
org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
at 
org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77
)
at 
org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
at 
org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInter
ceptor.java:111)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
at $Proxy185.issueCard(Unknown Source)
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:324)
at 
org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:347
)
at 
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:2
25)
at 
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:263)
at 
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:
71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:154)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:121)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:288)
at 
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:543)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
at 
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandl
er.java:294)
at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
at 
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext
.java:507)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1664)
at org.mortbay.http.HttpServer.service(HttpServer.java:863)
at org.jboss.jetty.Jetty.service(Jetty.java:460)
at 
org.mortbay.http.HttpConnection.service(HttpConnection.java:775)
Ciao,
Jonathan O'Connor
XCOM Dublin


---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest

RE: [JBoss-user] JBoss-net does not like calling EJB method with transaction type = never

2003-11-14 Thread Stephane Nicoll
 Perhaps you should consider NotSupported which will suspend the Axis
 transaction whilst inside your bean. Not sure what happens if you bean
 then tries to call other beans which are marked Required.

If the bean is 'never' it won't work anyway (because the calls to the SB
with 'Required' TX attribute is done withiout a TX context). RequiresNew
should be used in that case.

Regards,

Stephane


---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] JBoss-net does not like calling EJB method with transaction type = never

2003-11-14 Thread Yates, Danny
The other option is that the Axis transaction is unsuspended for the
second-tier
beans. Effectively, this will make all your second-tier beans run in one
transaction.

If this is what happens.

-- 
Danny Yates


-Original Message-
From: Jonathan.O'[EMAIL PROTECTED] [mailto:Jonathan.O'[EMAIL PROTECTED] 
Sent: 14 November 2003 16:12
To: [EMAIL PROTECTED]
Subject: RE: [JBoss-user] JBoss-net does not like calling EJB method with
transaction type = never


Danny,
Thanks NotSupported fixed it alright. But I still think that Web 
Services should not wrap everything in a transaction.
I presume that new transactions are created whenever it calls beans marked 
as required. At least my tests all run smoothly.
Ciao,
Jonathan O'Connor
XCOM Dublin




Yates, Danny [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
14.11.2003 14:06
Please respond to jboss-user
 
To: '[EMAIL PROTECTED]' 
[EMAIL PROTECTED]
cc: 
Subject:RE: [JBoss-user] JBoss-net does not like calling 
EJB method with transaction type = never


I would guess that what is happening is:

1) Axis starts a transaction to call your Web Services class
2) Your Web Services class (now in a transaction) tries to call the bean
3) Because the bean is marked never, the call fails

Perhaps you should consider NotSupported which will suspend the Axis
transaction whilst inside your bean. Not sure what happens if you bean
then tries to call other beans which are marked Required.

-- 
Danny Yates


-Original Message-
From: Jonathan.O'[EMAIL PROTECTED] [mailto:Jonathan.O'[EMAIL PROTECTED] 
Sent: 14 November 2003 12:51
To: [EMAIL PROTECTED]
Subject: [JBoss-user] JBoss-net does not like calling EJB method with
transaction type = never


I'm working on JBoss 3.0.8.
I am trying to call an EJB Session Bean method via SOAP/Axis. The bean 
method is marked @ejb.transaction-type = never because it calls 3 other 
session beans that handle their own transactions.

According to the stack trace, the Axis RPCProvider.invokeMethod is 
eventually trying to run with Transactions. Should it not obey the 
transaction type info from ejb-jar.xml?
Any help is appreciated.

I get the following stack trace:
javax.ejb.EJBException: Transaction not allowed
at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:330)
at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:98)
at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:13
0)
at 
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
at 
org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.jav
a:313)
at org.jboss.ejb.Container.invoke(Container.java:738)
at 
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at 
org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:99)
at 
org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
at 
org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77
)
at 
org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
at 
org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInter
ceptor.java:111)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
at $Proxy185.issueCard(Unknown Source)
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:324)
at 
org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:347
)
at 
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:2
25)
at 
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:263)
at 
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:
71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:154)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:121)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:288)
at 
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:543)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
at 
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandl
er.java:294)
at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
at 
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext
.java:507