[JBoss JIRA] Created: (JBAS-3644) ejbqltosql92compiler creates LEFT OUTER JOIN when INNER JOIN would be faster
by anajavi (JIRA)
ejbqltosql92compiler creates LEFT OUTER JOIN when INNER JOIN would be faster
----------------------------------------------------------------------------
Key: JBAS-3644
URL: http://jira.jboss.com/jira/browse/JBAS-3644
Project: JBoss Application Server
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: CMP service
Affects Versions: JBossAS-4.0.3 SP1
Environment: JBoss 4.0.3SP1, Sybase 12.5 (and Sybase 15.0)
Reporter: anajavi
Assigned To: Alexey Loubyansky
Ejbqltosql92compiler creates LEFT OUTER JOIN's when INNER JOIN could be used. This leads to bad performance, because database server does table scan instead of using index.
Running INNER JOIN instead of LEFT OUTER JOIN gives 10x better performance (0,6s/query vs. 0,06s/query).
I submitted this as a feature request because it is about performance, not bug. However, this bad performance prevents us from using cmp2.x jdbc2 pm, which we would seriously need.
I tried to go through ejbqltosql92compiler's source, but could not figure out a clean way to make it use INNER JOIN when joining is caused by a path in WHERE-clause (not containing OR).
I also tried tweaking RDBMS optimizer and upgrading to newer version, but it did not help.
Example:
Original EJBQL:
SELECT OBJECT(o) FROM Rooli AS o WHERE o.toimipaikka.yritys.id=?1 AND o.rooli.nimi=?2
Generated SQL:
SELECT t0_o.id, t0_o.sahkoposti, t0_o.oletusrooli, t0_o.elinkaaren_pvm, t0_o.elinkaaren_tila, t0_o.fk_henkilo, t0_o.fk_toimipaikka, t0_o.fk_kooditus_rooli, t0_o.meta_fk_creator, t0_o.fk_osoite
FROM rooli t0_o
LEFT OUTER JOIN kooditus_arvo t2_o_rooli ON t0_o.fk_kooditus_rooli=t2_o_rooli.id
LEFT OUTER JOIN toimipaikka t3_o_toimipaikka ON t0_o.fk_toimipaikka=t3_o_toimipaikka.id
LEFT OUTER JOIN yritys t1_o_toimipaikka_yritys ON t3_o_toimipaikka.fk_yritys=t1_o_toimipaikka_yritys.id
WHERE t1_o_toimipaikka_yritys.id = 42447 AND t2_o_rooli.nimi = 'aaa'
10x faster SQL:
SELECT t0_o.id, t0_o.sahkoposti, t0_o.oletusrooli, t0_o.elinkaaren_pvm, t0_o.elinkaaren_tila, t0_o.fk_henkilo, t0_o.fk_toimipaikka, t0_o.fk_kooditus_rooli, t0_o.meta_fk_creator, t0_o.fk_osoite
FROM rooli t0_o
INNER JOIN kooditus_arvo t2_o_rooli ON t0_o.fk_kooditus_rooli=t2_o_rooli.id
INNER JOIN toimipaikka t3_o_toimipaikka ON t0_o.fk_toimipaikka=t3_o_toimipaikka.id
INNER JOIN yritys t1_o_toimipaikka_yritys ON t3_o_toimipaikka.fk_yritys=t1_o_toimipaikka_yritys.id
WHERE t1_o_toimipaikka_yritys.id = 42447 AND t2_o_rooli.nimi = 'aaa'
Thank you.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 4 months
[JBoss JIRA] Created: (EJBTHREE-862) EJB 3.0 dependencies injection accross EARs
by Roland R?z (JIRA)
EJB 3.0 dependencies injection accross EARs
-------------------------------------------
Key: EJBTHREE-862
URL: http://jira.jboss.com/jira/browse/EJBTHREE-862
Project: EJB 3.0
Issue Type: Bug
Components: EJB3 Extensions
Affects Versions: EJB 3.0 RC9 - Patch 1
Environment: Windows, JDK 1.5.0_06-b05, JBoss 4.0.5 GA, EJB-3.0_RC9 Patch 1
Reporter: Roland R?z
We have a deployment schema similar to the example from EJB 3.0 specification (chapter 19.6 Example):
ear1:
FirstReferencer.jar Class-Path:FirstReferencer-client.jar SecondReferencer-client.jar
FirstReferencer-client.jar
SecondReferencer-client.jar
ear2:
SecondReferencer.jar Class-Path:SecondReferencer-client.jar
SecondReferencer-client.jar
deployment descriptor contains:
<ejb-client-jar>SecondReferencer-client.jar</ejb-client-jar>
There are two session beans FirstReferencer and SecondReferencer. FirstReferencer references SecondReferencer over the dependency injection. After deployment if we call the business method on the FirstReferencer, which in turn calls SecondReferencer we get exception like this:
16:22:12,155 ERROR [STDERR] java.lang.RuntimeException: Non matching type for inject of field: SecondReferencer FirstReferencerEjb.secondReferencer for type: $Proxy79 of jndiName env/FirstReferencerEjb/secondReferencer
intfs: , SecondReferencer, org.jboss.ejb3.JBossProxy, javax.ejb.EJBObject
16:22:12,155 ERROR [STDERR] at org.jboss.injection.JndiFieldInjector.inject(JndiFieldInjector.java:135)
16:22:12,155 ERROR [STDERR] at org.jboss.injection.JndiFieldInjector.inject(JndiFieldInjector.java:104)
16:22:12,155 ERROR [STDERR] at org.jboss.injection.JndiFieldInjector.inject(JndiFieldInjector.java:61)
16:22:12,155 ERROR [STDERR] at org.jboss.ejb3.AbstractPool.create(AbstractPool.java:92)
16:22:12,155 ERROR [STDERR] at org.jboss.ejb3.ThreadlocalPool.get(ThreadlocalPool.java:48)
16:22:12,165 ERROR [STDERR] at org.jboss.ejb3.cache.simple.SimpleStatefulCache.create(SimpleStatefulCache.java:209)
16:22:12,165 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulContainer.dynamicInvoke(StatefulContainer.java:303)
16:22:12,165 ERROR [STDERR] at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
16:22:12,165 ERROR [STDERR] at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
16:22:12,175 ERROR [STDERR] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828)
16:22:12,175 ERROR [STDERR] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681)
16:22:12,175 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358)
16:22:12,175 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:412)
16:22:12,175 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239)
16:22:12,185 ERROR [STDERR] Caused by: java.lang.IllegalArgumentException
16:22:12,185 ERROR [STDERR] at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:63)
16:22:12,185 ERROR [STDERR] at java.lang.reflect.Field.set(Field.java:656)
16:22:12,185 ERROR [STDERR] at org.jboss.injection.JndiFieldInjector.inject(JndiFieldInjector.java:119)
16:22:12,185 ERROR [STDERR] ... 13 more
On debuging and from the stacktrace of the exception we can see that the lookup for refernced EJB works fine but the assigning over reflaction fails. It seems to be a ClassLoading issue there.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 4 months
[JBoss JIRA] Created: (BPEL-244) Support for BPEL process instance monitoring in jBPM admin console
by Meghana Joglekar (JIRA)
Support for BPEL process instance monitoring in jBPM admin console
------------------------------------------------------------------
Key: BPEL-244
URL: http://jira.jboss.com/jira/browse/BPEL-244
Project: JBoss jBPM BPEL
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Engine
Reporter: Meghana Joglekar
Assigned To: Alejandro Guizar
One can currently run BPEL processes on jBPM engine and check the log files to see the runtime report. But this process is not efficient in monitoring how the process is doing, what processes are running, what went wrong when a fault occurred etc. It will be nice to have administration console to see this information. The administration console can then list the process instances that are running, show visual graph of the instance and for each node in the graph more information about it. ActiveBPEL and OracleBPEL both provide such consoles and they are great tools for administrators. It will be nice if it also provides 'delete' functionality for stalled processes or old processes. The list could go on but in its basic form, processes listing, process instance listing and then more information about them [instances] will be useful.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 5 months
[JBoss JIRA] Created: (JBRULES-759) CLONE -Unable to add package after it was added and removed
by Brugger Antony (JIRA)
CLONE -Unable to add package after it was added and removed
-----------------------------------------------------------
Key: JBRULES-759
URL: http://jira.jboss.com/jira/browse/JBRULES-759
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Reteoo
Affects Versions: 3.0.4
Environment: Windows2000 Advanced Server
JBRules3.0.4
Reporter: Brugger Antony
Assigned To: Edson Tirelli
Fix For: 3.0.5
Unable remove a rule package when it was added after it has been added and removed.
I have seen the issue [#JBRULES-358]. My test go a little far than [#JBRULES-358].
I remove the package again when it was added for the seconn time, then an exception was thrown.
My test case is:
public void testRuleBaseRemove() throws Exception
{
RuleBase ruleBase = RuleBaseFactory.newRuleBase();
File file = new File("test.drl");
//add and remove
PackageBuilder builder = new PackageBuilder();
builder.addPackageFromDrl(new FileReader(file));
Package pkg = builder.getPackage();
ruleBase.addPackage(pkg);
ruleBase.removePackage(pkg.getName());
//add and remove again
builder = new PackageBuilder();
builder.addPackageFromDrl(new FileReader(file));
pkg = builder.getPackage();
ruleBase.addPackage(pkg);
ruleBase.removePackage(pkg.getName());
}
the exception is throw:
java.lang.NullPointerException
at org.drools.reteoo.HashedObjectSinkList.remove(HashedObjectSinkList.java:102)
at org.drools.reteoo.ObjectTypeNode.remove(ObjectTypeNode.java:245)
at org.drools.reteoo.AlphaNode.remove(AlphaNode.java:211)
at org.drools.reteoo.AlphaNode.remove(AlphaNode.java:211)
at org.drools.reteoo.LeftInputAdapterNode.remove(LeftInputAdapterNode.java:285)
at org.drools.reteoo.TerminalNode.remove(TerminalNode.java:297)
at org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:589)
at org.drools.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:244)
at org.drools.common.AbstractRuleBase.removePackage(AbstractRuleBase.java:338)
at com.zte.ums.uep.pal.fm.osf.rules.core.RuleBaseTest.testRuleBaseRemove(RuleBaseTest.java:71)
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 junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
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:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 5 months