Re: [jboss-user] [JCA Development] - JcaXAResourceRecovery
by Ivo Studenský
Ivo Studenský [http://community.jboss.org/people/istudens%40redhat.com] replied to the discussion
"JcaXAResourceRecovery"
To view the discussion, visit: http://community.jboss.org/message/534595#534595
--------------------------------------------------------------
The crash recovery tests are automated in the AS testsuite as an optional task, see testsuite/imports/config/tests-crash-recovery.xml and https://jira.jboss.org/jira/browse/JBAS-7219 JBAS-7219. They are included in both, the EAP5 branch and trunk.
Currently, the recovery tests run against selected databases inside the redhat network, namely PostgreSQL 8.2 and 8.3, Oracle 10g and 11g, Sybase 15, DB2 9.7, MSSQL 2005 and 2008, MySQL 5.0 and 5.1, i.e. supported db's for EAP. They don't use Derby at the moment.
The current tests involve only XA-datasource for each supported db in crash recovery and there is a question what other types of JCA XA resources they could involve into the recovery testing. It is subject for discussion.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/534595#534595]
Start a new discussion in JCA Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 8 months
Re: [jboss-user] [JBoss Microcontainer Development] - On demand resolution
by Adrian Brock
Adrian Brock [http://community.jboss.org/people/adrian%40jboss.org] replied to the discussion
"On demand resolution"
To view the discussion, visit: http://community.jboss.org/message/534591#534591
--------------------------------------------------------------
> Ales Justin wrote:
>
> > I created a test for DynamicImport-Package to check whether https://jira.jboss.org/jira/browse/JBCL-131 https://jira.jboss.org/jira/browse/JBCL-131 is actually working at the OSGi layer.
> I fail to see how dynamic import and JBCL-131 are related?
> JBCL-131 is an impl of OSGi' lazy bundle activation -- e.g. only invoke BundleActivator if some class from that bundle needs to be loaded.
Well actually JBCL-131 is about lazy resolve, not lazy start.
It's not working because it hasn't been enabled.
I've committed the following patch which makes it work using Ales's DeploymentMetaData
(I've not done anything with lazy start).
I don't know if that is the correct place for it?
Another question is whether you always want to enable lazy resolve for OSGi, even if the user specifies something else?
P.S. There's no point re-opening issues in closed releases. You need to raise new issues.
/core/src/main/java/org/jboss/osgi/framework/deployers
$ svn diff
Index: AbstractClassLoadingDeployer.java
===================================================================
--- AbstractClassLoadingDeployer.java (revision 103238)
+++ AbstractClassLoadingDeployer.java (working copy)
@@ -29,6 +29,7 @@
import org.jboss.classloading.spi.metadata.CapabilitiesMetaData;
import org.jboss.classloading.spi.metadata.ClassLoadingMetaData;
import org.jboss.classloading.spi.metadata.RequirementsMetaData;
+import org.jboss.deployers.plugins.classloading.DeploymentMetaData;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.deployer.DeploymentStages;
import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
@@ -61,7 +62,10 @@
{
super(OSGiMetaData.class);
addInput(AbstractBundleState.class);
- setOutput(ClassLoadingMetaData.class);
+ addInput(ClassLoadingMetaData.class);
+ addInput(DeploymentMetaData.class);
+ addOutput(ClassLoadingMetaData.class);
+ addOutput(DeploymentMetaData.class);
setStage(DeploymentStages.POST_PARSE);
setTopLevelOnly(true);
}
@@ -79,6 +83,13 @@
@Override
public void deploy(DeploymentUnit unit, OSGiMetaData osgiMetaData) throws DeploymentException
{
+ if (unit.isAttachmentPresent(DeploymentMetaData.class) == false)
+ {
+ DeploymentMetaData deploymentMetaData = new DeploymentMetaData();
+ deploymentMetaData.setLazyResolve(true);
+ unit.addAttachment(DeploymentMetaData.class, deploymentMetaData);
+ }
+
if (unit.isAttachmentPresent(ClassLoadingMetaData.class))
return;
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/534591#534591]
Start a new discussion in JBoss Microcontainer Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 8 months
Re: [jboss-user] [jBPM] - Problems with usage python language in jpdl.xml
by Andrey Chuyko
Andrey Chuyko [http://community.jboss.org/people/chuiko.andrew] replied to the discussion
"Problems with usage python language in jpdl.xml"
To view the discussion, visit: http://community.jboss.org/message/534581#534581
--------------------------------------------------------------
Hi !
I had localized this problem. The class org.jbpm.pvm.internal.script.EnvironmentBindings doesn`t store locale variables from script:
+*public Object put(String key, Object value) {
return null;
}*+
Groovy engine ignores it and stores local variables in its own storage.
Jython engine obeys the limitations of Bindings, so it can`t store local variables if Bindings doesn`t allow it!!!!!
If is it desireable behaviour ?
Possible solution is adding local storage to EnvironmentBindings and to allow putting values in it.
Such as :
+*private HashMap<String, Object> locals = new HashMap<String, Object>();*+
+*
*+
+*+*public Object put(String key, Object value) {
return null;
}*+*+
+*
*+
+*public Object get(Object key) {*+
+* if (locals.containsKey((String)key))*+
+* return locals.+*get((String)key);*+*+
+* else return environment.get((String)key);}*+
What do you think about this?
Thanks a lot, Andrew
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/534581#534581]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 8 months
[jBPM] - NullPointerException when timeout transition maps to a Java activity
by Sameeh Harfoush
Sameeh Harfoush [http://community.jboss.org/people/sameeh.harfoush] created the discussion
"NullPointerException when timeout transition maps to a Java activity"
To view the discussion, visit: http://community.jboss.org/message/534568#534568
--------------------------------------------------------------
Hello,
Below is a section of a workflow I am working on
When triggering the timer the transition “Manager timeout” goes to the java activity “Send timesheet to accounts” and executes the “manageTimesheet” method which only executes System.out to the console. All goes well but I always get the below null pointer exception.
I tried mapping the transition to other than java task it works fine. The problem is in my implantation or the jpdl Timer?
Thanks
<task g="105,159,156,52" name="Manager reviews timesheet">
<assignment-handler>
<field name="assignee">
<string value="Mahmoud" />
</field>
</assignment-handler>
<transition g="433,186;435,673:-43,-16" name="Manager timeout" to="Send timesheet to accounts">
<timer duedate="1 hour" />
</transition>
<transition g="-68,-18" name="Manager decision" to="Manager evaluation" />
</task>
<decision g="159,267,48,48" name="Manager evaluation">
<handler />
<transition g="-93,-11" name="Approve" to="Send timesheet to accounts" />
<transition g="348,292;352,673:-82,-206" name="Reject" to="Employee submits timesheet" />
</decision>
<java g="102,356,163,52"
method="manageTimesheet" name="Send timesheet to accounts">
<transition g="-83,-8" name="to Bookkeeper" to="Bookkeeper reviews and posts timesheet" />
</java>
### EXCEPTION ###########################################
10:25:51,983 SEV | [ExecuteJobCmd] exception while executing 'timer[550012|2010-03-30 11:25:51,000|Manager timeout]'
java.lang.NullPointerException
at org.jbpm.pvm.internal.wire.usercode.UserCodeReference.getProcessDefinition(UserCodeReference.java:75)
at org.jbpm.pvm.internal.wire.usercode.UserCodeReference.getObject(UserCodeReference.java:60)
at org.jbpm.pvm.internal.wire.usercode.UserCodeReference.getObject(UserCodeReference.java:51)
at org.jbpm.pvm.internal.model.ExecutionImpl.initializeAssignments(ExecutionImpl.java:759)
at org.jbpm.jpdl.internal.activity.TaskActivity.execute(TaskActivity.java:95)
at org.jbpm.jpdl.internal.activity.TaskActivity.execute(TaskActivity.java:58)
at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60)
at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:656)
at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:616)
at org.jbpm.pvm.internal.model.op.TransitionEndActivity.perform(TransitionEndActivity.java:58)
at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:656)
at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:616)
at org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:417)
at org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:403)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:197)
at org.jbpm.pvm.internal.model.ExecutionImpl_$$_javassist_5.signal(ExecutionImpl_$$_javassist_5.java)
at org.jbpm.pvm.internal.job.TimerImpl.execute(TimerImpl.java:91)
at org.jbpm.pvm.internal.job.TimerImpl.execute(TimerImpl.java:52)
at org.jbpm.pvm.internal.cmd.ExecuteJobCmd.execute(ExecuteJobCmd.java:76)
at org.jbpm.pvm.internal.cmd.ExecuteJobCmd.execute(ExecuteJobCmd.java:42)
at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)
at org.jbpm.pvm.internal.svc.ManagementServiceImpl.executeJob(ManagementServiceImpl.java:37)
at com.roxana.test.jpdl.EmployeeTimesheetTest.testEmployeeTimesheetWorkflow(EmployeeTimesheetTest.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:164)
at org.jbpm.test.BaseJbpmTestCase.runTest(BaseJbpmTestCase.java:80)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/534568#534568]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 8 months
Re: [jboss-user] [Javassist] - Saving proxy classes and using them in Android
by Eric H
Eric H [http://community.jboss.org/people/EricJava] replied to the discussion
"Saving proxy classes and using them in Android"
To view the discussion, visit: http://community.jboss.org/message/534561#534561
--------------------------------------------------------------
I answer my own question.
It looks like Javassist isn't the right tool for this. It needs to mess with classloaders, an area where Android is quite different from standard Java. Also it has more flexibility. The class can be final, doesn't need a no-args constructor, etc.
I got it done with ASM. ASM was perfect for this. It lets me modify the class itself, rather than creating a proxy for it. That's (slightly) better for performance, and also makes it very easy to use them with the rest of the Android packaging tools.
The hard part about ASM were two things:
* It's a bit of an API to deal with.
* The new code I insert had to be Java assembly
But there's a trick that made it easier to get the assembly code. There's a ASMifier tool that generates ASM API calls to generate a given class file. So you just write the code you want, run ASMifier on it, and cut and paste the assembly generator calls. But doing anything more than small amounts of code would be a big pain IMO.
Anyway, both are impressive tools, but ASM was the right one for this job.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/534561#534561]
Start a new discussion in Javassist at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 8 months