[Design of JCA on JBoss] - Re: connection management on tx timeout
by adrian@jboss.org
"jhalliday" wrote : A couple of questions related to JBAS-5080, i.e. how connections behave if used either side of a asynchronous transaction timeout.
|
| Am I right that the expected behaviour of a connection handle obtained in a transaction but subsequently used after that transaction has been rolled back on another thread, is that it should behave as if closed? The JIRA is not too clear on what the actual fix was.
|
It will throw a RollbackException (wrapped in an SQLException) if you try to use
the connection or one of its child objects (e.g. a statement)
after the transaction is aborted.
anonymous wrote :
| Now the more difficult one: what's the expected JCA behaviour when a Thread that has a transaction context representing an aborted transaction, asks for a new connection? This happens if a transaction timeouts and is rolled back in the background, then the application logic tries to obtain a new connection. The new connection should be part of the ongoing global tx, but that tx is dead. Hopefully the getConnection call will throw an exception if the tx state is other than active?
|
Correct. The pool does a check early to avoid unnecessary allocation of a connection,
but the real definitive test is when it tries to do the Transaction.enlistResource()
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4196547#4196547
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4196547
17 years, 3 months
[Design of AOP on JBoss (Aspects/JBoss)] - Re: Reimplementing ClassPools for AS
by alesj
"kabir.khan(a)jboss.com" wrote :
| Does a module represent a jar, thus meaning import everything from that jar?
|
I wouldn't call it 'import everything from that bundle'.
It's more like a plain bundle dependency, where you trust that bundle to have the packages/classes you need.
e.g. you know you're using Hibernate, so instead of doing every Hibernate import,
you just say I need Hibernate module, as you know that the Hibernate stuff you use it's gonna be there
"kabir.khan(a)jboss.com" wrote : And is package more fine-grained, meaning only import these packages from that jar?
|
Yup, exactly.
It's when you need more fine-grained dependencies.
"kabir.khan(a)jboss.com" wrote :
| Whatever the answer, I suppose the Module/Package difference would also apply to the capabilities?
|
Module capabilities are filtered.
e.g. VFSDeploymentClassLoaderPolicyModule
| // We have a module capability
| Object version = getVersion();
| Capability capability = factory.createModule(getName(), version);
| capabilities.add(capability);
|
| // Do we determine package capabilities
| ClassFilter included = getIncluded();
| ClassFilter excluded = getExcluded();
| ClassFilter excludedExport = getExcludedExport();
| ExportAll exportAll = getExportAll();
| if (exportAll != null)
| {
| Set<String> exportedPackages = PackageVisitor.determineAllPackages(roots, excludedRoots, exportAll, included, excluded, excludedExport);
| for (String packageName : exportedPackages)
| {
| capability = factory.createPackage(packageName, version);
| capabilities.add(capability);
| }
| }
|
| return capabilities;
|
Package capabilities would normally come from jboss-classloading.xml,
an explicit definition -> capabilities/package/name+version ...
"kabir.khan(a)jboss.com" wrote :
| Also, what is UsesPackageRequirement?
|
It's when some export depends on some other bundle/api.
| A comma-separated list of package names that are used by the
| exported package. Note that the use of a comma in the value requires it
| to be enclosed in double quotes. If this exported package is chosen as an
| export, then the resolver must ensure that importers of this package wire
| to the same versions of the package in this list.
|
| ...
|
| Classes can depend on classes in other packages. For example, when they
| extend classes from another package, or these other classes appear in
| method signatures. It can therefore be said that a package uses other packages.
| These inter-package dependencies are modeled with the uses directive
| on the Export-Package header.
| For example, org.osgi.service.http depends on the package javax.servlet
| because it is used in the API. The export definition of the
| org.osgi.service.http must therefore contain the uses directive with the
| javax.servlet package as its value.
|
So you need to import that, in order to resolve properly,
as 'uses' enforces a transitive dependency on exact version.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4196509#4196509
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4196509
17 years, 3 months
[Design of JBoss ESB] - org.drools.RuntimeDroolsException: unable to determine Value
by jarkko@jab.fi
Just found this on the server log. Anyone seen this before?
org.drools.RuntimeDroolsException: unable to determine ValueType for Class [class org.jboss.internal.soa.esb.message.format.xml.MessageImpl]
at org.drools.base.ValueType.determineValueType(ValueType.java:222)
at org.drools.base.ClassObjectType.(ClassObjectType.java:56)
at org.drools.reteoo.Rete$ClassObjectTypeConf.(Rete.java:442)
at org.drools.reteoo.Rete.assertObject(Rete.java:152)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)
at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:900)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:883)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:684)
at org.drools.reteoo.ReteooStatelessSession.execute(ReteooStatelessSession.java:160)
at org.jboss.internal.soa.esb.services.rules.DroolsRuleService.executeStatelessRules(DroolsRuleService.java:584)
at org.jboss.internal.soa.esb.services.rules.DroolsRuleService.executeStatelessRules(DroolsRuleService.java:126)
at org.jboss.internal.soa.esb.services.rules.RuleServiceCallHelper.executeRulesService(RuleServiceCallHelper.java:126)
at org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter.route(JBossRulesRouter.java:123)
at org.jboss.soa.esb.actions.ContentBasedWiretap.executeRules(ContentBasedWiretap.java:168)
at org.jboss.soa.esb.actions.ContentBasedWiretap.process(ContentBasedWiretap.java:140)
at org.jboss.soa.esb.actions.ContentBasedRouter.process(ContentBasedRouter.java:58)
at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:316)
at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:530)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:896)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:735)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4196403#4196403
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4196403
17 years, 3 months