[EJB 3.0] - Re: Transaction question, REQUIRES_NEW
by atamur
"busawreck" wrote : I have a Stateless SB with a business method (m1) for completing a series of tasks all in their own transactions, so that if task xx fails the other tasks will still complete. For each task I call a business method (m2) on the same bean with the annotation TransactionAttribute(REQUIRES_NEW).
| I would expect that when I throw (and catch) a RuntimeException in m2, it would mark my current transaction for rollback, but the transaction in m1 would not be marked for rollback. When I run my program though, I notice that after the RuntimException has been thrown (and caught) in m2, the transaction in m1 is marked for rollback, hence all calls to m2 fails aswell.
| Where am I doing/thinking wrong :).
please provide some code
if you haveclass sb implemets sb_remote{
| @EJB
| private sb_remote sb;
| public void m1() {
| }
|
| public void m2() {
| }
| }
|
you should write in m1:
sb.m2() not this.m2!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979623#3979623
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979623
19 years, 8 months
[Installation, Configuration & Deployment] - NoClassDefFoundError: javax/xml/namespace/QName on EAR start
by mitchelln
Hi
We are having issues deploying an app that uses axis and spring in Jboss to query a SOAP service.
We are using
JBoss 4.0.4.GA
Java 1.5.0_08-b03
Axis 1.4
Spring 2.0rc4
Here is part of the stacktrace we get:
NoClassDefFoundError: javax/xml/namespace/QName
Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gamexBrokerWebService' defined in class path resourc
e [broker-webservice-applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/xm
l/namespace/QName
Caused by:
java.lang.NoClassDefFoundError: javax/xml/namespace/QName
at org.apache.axis.deployment.wsdd.WSDDConstants.(WSDDConstants.java:75)
at org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:179)
at org.apache.axis.AxisEngine.init(AxisEngine.java:172)
at org.apache.axis.AxisEngine.(AxisEngine.java:156)
at org.apache.axis.client.AxisClient.(AxisClient.java:52)
at org.apache.axis.client.Service.getAxisClient(Service.java:104)
at org.apache.axis.client.Service.(Service.java:157)
at org.apache.axis.client.ServiceFactory.createService(ServiceFactory.java:198)
at org.springframework.remoting.jaxrpc.LocalJaxRpcServiceFactory.createService(LocalJaxRpcServiceFactory.java:273)
at org.springframework.remoting.jaxrpc.LocalJaxRpcServiceFactory.createJaxRpcService(LocalJaxRpcServiceFactory.java:209)
at org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.prepare(JaxRpcPortClientInterceptor.java:358)
at org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.afterPropertiesSet(JaxRpcPortClientInterceptor.java:331)
at org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean.afterPropertiesSet(JaxRpcPortProxyFactoryBean.java:63)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory
.java:957)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.ja
va:924)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:4
15)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:246)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:12
8)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFacto
ry.java:850)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java
:624)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:4
11)
We can run unit tests outside of JBoss and everything is fine, its only when we try and deploy in JBoss we get the error on startup.
Any help would be greatly received.
Cheers
Neil
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979620#3979620
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979620
19 years, 8 months
[JBoss Seam] - Re: jbpm as external sar seam configuration
by Jabberwocky
I've added new property named 'jndiConfiguration' for org.jboss.seam.core.Jbpm component and fixed method for creation jbpmConfiguration
| private void initJbpmConfiguration(){
| if (jndiConfiguration != null && !"".equals(jndiConfiguration.trim())) {
| try { jbpmConfiguration= (JbpmConfiguration) new InitialContext().lookup(jndiConfiguration);
| } catch (NamingException e) {
| throw new RuntimeException("Can not create jbpmConfiguration from jndi. jndiName='"+jndiConfiguration+"'",e);
| }
| }else {
| jbpmConfiguration = JbpmConfiguration.getInstance();
| }
| ....
| }
|
components.xml
| <component class="org.jboss.seam.core.Jbpm">
| <property name="jndiConfiguration">java:/jbpm/JbpmConfiguration</property>
| </component>
|
Now everythig looks fine.
Is that enough for jira feature request?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979619#3979619
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979619
19 years, 8 months
[EJB 3.0] - 4.0.5.GA & EJB3.0RC9 Message Bean Issue
by pshrimpton
Hi,
Not sure if this is the correct forum, but...
Had a problem with message beans in 4.0.5.GA & EJB3.0RC9 (they worked fine in 4.0.4.GA & EJB3.0RC8)
During deployment all Meassage beans failed to deploy with the error message...
java.lang.RuntimeException: unable to determine messagingType interface for MDB
at org.jboss.ejb3.mdb.MDB.getMessagingType(MDB.java:88)
at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.resolveMessageListener(JBossMessageEndpointFactory.java:241)
at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.start(JBossMessageEndpointFactory.java:184)
at org.jboss.ejb3.mdb.MessagingContainer.startProxies(MessagingContainer.java:185)
at org.jboss.ejb3.mdb.MessagingContainer.start(
The problem turned out to be that all my message beans had a common parent that implemented javax.jms.MessageListener..
public abstract class AbstractMessageBean implements javax.jms.MessageListener {}
public class ConcreteMessageBean extends AbstractMessageBean {}
..and for some reason jboss did not think my ConcreteMessageBean implemented MessageListener. Implementing the MessageListener inteface again on my ConreteMessageBeans seams to have fixed this issue, e.g...
public class ConcreteMessageBean extends AbstractMessageBean implements MessageListener {}
Is this a bug?
Cheers
Phil
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979614#3979614
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979614
19 years, 8 months