[JBoss JIRA] (WFLY-7914) injection of sub-sub-EJB fails with proxy
by Tom Eicher (JIRA)
Tom Eicher created WFLY-7914:
--------------------------------
Summary: injection of sub-sub-EJB fails with proxy
Key: WFLY-7914
URL: https://issues.jboss.org/browse/WFLY-7914
Project: WildFly
Issue Type: Bug
Affects Versions: 10.1.0.Final
Environment: WildFly 10.1.0.Final
wildfly-arquillian-2.0.2.Final
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)
Reporter: Tom Eicher
Assignee: Jason Greene
When a hierarchy of EJBs is looked up via {{Inject Instance}} for an interface that the toplevel ejb implements, lower-hierarchy EJBs are not found unless they (redundantly) reimplement the interface, when Weld is using view proxies.
In more Detail:
{code}
public interface A extends Serializable {}
...
@Stateless
public class A1 implements A {
public A1() {
}
}
...
public interface B extends A {}
...
@Stateless
public class B1 implements B {
public B1() {
}
}
...
public abstract class C implements A { }
...
@Stateless
public class C1 extends C {
public C1() {
}
}
...
@Stateless
public class C2 extends C implements A {
public C2() {
}
}
...
@Singleton
public class WeldProcessorInjectionProblemBean {
}
...
public class WeldProcessortInjectionProblemTest {
@Inject WeldProcessorInjectionProblemBean client;
@Inject @Any Instance<A> testinstances;
@Test
public void testSubclassInjection() {
boolean foundE1=false, foundE2=false;
for (A a : testinstances) {
if (a instanceof E1) {
foundE1=true;
}
if (a instanceof E2) {
foundE2=true;
}
}
Assert.assertFalse("subsub EJB without re-implementaion of parent-parent-if was found. Weld was fixed. please remove workaround.", foundE1);
Assert.assertTrue("subsub EJB with re-implementaion of parent-parent-if was found. Weld even more broken?", foundE2);
}
}
...
Proxy for view class: com.ehtwo.core.util.A of EJB: C2
Proxy for view class: com.ehtwo.core.util.A of EJB: A1
Proxy for view class: com.ehtwo.core.util.B of EJB: B1
{code}
so, C1 is _not found/injected_ but C2 _is found/injected_, just because C2 re-implements A, which is redundant because it's at the top of the class hierarchy anyway.
this only happens when "proxy for view" are being applied. (in my case because the EJBs are in a JAR and the Test in a WAR inside an EAR). When running inside one module, and no weld proxies are used, all classes including C1 are injected correctly.
please move/copy issue to Wildfly-Core or Weld or as you see fit.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 3 months
[JBoss JIRA] (WFLY-7913) Rename default-realm attribute in Elytron properties-realm
by Josef Cacek (JIRA)
[ https://issues.jboss.org/browse/WFLY-7913?page=com.atlassian.jira.plugin.... ]
Josef Cacek updated WFLY-7913:
------------------------------
Labels: user_experience (was: )
> Rename default-realm attribute in Elytron properties-realm
> ----------------------------------------------------------
>
> Key: WFLY-7913
> URL: https://issues.jboss.org/browse/WFLY-7913
> Project: WildFly
> Issue Type: Bug
> Components: Security
> Reporter: Josef Cacek
> Assignee: Darran Lofthouse
> Labels: user_experience
>
> The newly introduced attribute {{default-realm}} in {{properties-realm}} configuration in Elytron is ambiguous and should be renamed. The attribute contains default value for realm-name and it's used in password hash computation. So it's rather related to {{users-properties}} part only.
> *Suggestion for improvement:*
> Rename the attribute to sth. like {{realm-name-to-hash}} and put it into {{users-properties}} configuration if possible.
> {code:xml}
> <properties-realm name="ApplicationRealm">
> <users-properties path="application-users.properties" relative-to="jboss.server.config.dir" realm-name-to-hash="ApplicationRealm"/>
> <groups-properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>
> </properties-realm>
> {code}
> or (if it's not easy to have it in users-properties configuration)
> {code:xml}
> <properties-realm name="ApplicationRealm" realm-name-to-hash="ApplicationRealm">
> <users-properties path="application-users.properties" relative-to="jboss.server.config.dir"/>
> <groups-properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>
> </properties-realm>
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 3 months
[JBoss JIRA] (WFLY-7913) Rename default-realm attribute in Elytron properties-realm
by Josef Cacek (JIRA)
Josef Cacek created WFLY-7913:
---------------------------------
Summary: Rename default-realm attribute in Elytron properties-realm
Key: WFLY-7913
URL: https://issues.jboss.org/browse/WFLY-7913
Project: WildFly
Issue Type: Bug
Components: Security
Reporter: Josef Cacek
Assignee: Darran Lofthouse
The newly introduced attribute {{default-realm}} in {{properties-realm}} configuration in Elytron is ambiguous and should be renamed. The attribute contains default value for realm-name and it's used in password hash computation. So it's rather related to {{users-properties}} part only.
*Suggestion for improvement:*
Rename the attribute to sth. like {{realm-name-to-hash}} and put it into {{users-properties}} configuration if possible.
{code:xml}
<properties-realm name="ApplicationRealm">
<users-properties path="application-users.properties" relative-to="jboss.server.config.dir" realm-name-to-hash="ApplicationRealm"/>
<groups-properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>
</properties-realm>
{code}
or (if it's not easy to have it in users-properties configuration)
{code:xml}
<properties-realm name="ApplicationRealm" realm-name-to-hash="ApplicationRealm">
<users-properties path="application-users.properties" relative-to="jboss.server.config.dir"/>
<groups-properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>
</properties-realm>
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 3 months
[JBoss JIRA] (DROOLS-1413) OOPath constraint bug2
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1413?page=com.atlassian.jira.plugi... ]
Mario Fusco reassigned DROOLS-1413:
-----------------------------------
Assignee: Mario Fusco (was: Matteo Mortari)
> OOPath constraint bug2
> ----------------------
>
> Key: DROOLS-1413
> URL: https://issues.jboss.org/browse/DROOLS-1413
> Project: Drools
> Issue Type: Sub-task
> Reporter: Matteo Mortari
> Assignee: Mario Fusco
>
> {code:java}
> @Test
> public void testWronglyMatchAlsoEqualsBis() {
> String drl =
> "import org.drools.compiler.xpath.*;\n" +
> "global java.util.Set duplicateNames; \n" +
> "\n" +
> "rule DIFF_FILES_BUT_WITH_SAME_FILENAME when\n" +
> " $dir1 : TMFileSet( $ic1 : /files, $ic2 : /files{name == $ic1.name}, $ic1 != $ic2 )\n" +
> "then\n" +
> " System.out.println( $dir1 + \".: \" + $ic1 + \" \" + $ic2 );\n" +
> " duplicateNames.add( $ic1.getName() );\n" +
> "end\n";
> KieSession ksession = new KieHelper().addContent( drl, ResourceType.DRL )
> .build()
> .newKieSession();
>
> Set duplicateNames = new HashSet();
> ksession.setGlobal("duplicateNames", duplicateNames);
>
> TMFileSet x = new TMFileSet("X");
> TMFile file0 = new TMFile("File0", 47);
> TMFile file1 = new TMFile("File1", 47);
> TMFile file2 = new TMFile("File0", 47);
> x.getFiles().addAll(Arrays.asList(new TMFile[]{file0, file1, file2}));
>
> ksession.insert(x);
> ksession.fireAllRules();
>
> assertTrue( duplicateNames.contains("File0") );
> assertFalse( duplicateNames.contains("File1") );
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 3 months
[JBoss JIRA] (WFLY-7912) It's not possible to change election-policy of singleton-policy
by Tomas Hofman (JIRA)
Tomas Hofman created WFLY-7912:
----------------------------------
Summary: It's not possible to change election-policy of singleton-policy
Key: WFLY-7912
URL: https://issues.jboss.org/browse/WFLY-7912
Project: WildFly
Issue Type: Bug
Components: Clustering
Affects Versions: 10.1.0.Final
Reporter: Tomas Hofman
Assignee: Paul Ferraro
Attempt to change election policy:
{code}
[standalone@localhost:9990 /] batch
[standalone@localhost:9990 / #] /subsystem=singleton/singleton-policy=default/election-policy=simple:remove
[standalone@localhost:9990 / #] /subsystem=singleton/singleton-policy=default/election-policy=random:add
[standalone@localhost:9990 / #] run-batch
{code}
results in
{code}
The batch failed with the following error (you are remaining in the batch editing mode to have a chance to correct the error):
WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:
Step: step-2
Operation: /subsystem=singleton/singleton-policy=default/election-policy=random:add
Failure: WFLYCTL0158: Operation handler failed: org.jboss.msc.service.DuplicateServiceException: Service org.wildfly.clustering.singleton.policy.default.election-policy is already registered
{code}
The bug seems to be introduced by https://github.com/wildfly/wildfly/commit/605b22c30ae122492e7c019e330fea2...
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 3 months
[JBoss JIRA] (ELY-835) SecurityIdentity Automatic Outflow
by Jan Martiska (JIRA)
[ https://issues.jboss.org/browse/ELY-835?page=com.atlassian.jira.plugin.sy... ]
Jan Martiska commented on ELY-835:
----------------------------------
[~honza889] What does this mean for EAP7-130? Will Batch subsystem's security domain be unable to inflow the identity from other domains, like ManagementDomain, which is I see as a typical use case - for executing jobs via management interfaces?
> SecurityIdentity Automatic Outflow
> ----------------------------------
>
> Key: ELY-835
> URL: https://issues.jboss.org/browse/ELY-835
> Project: WildFly Elytron
> Issue Type: Enhancement
> Components: API / SPI
> Reporter: Darran Lofthouse
> Assignee: Jan Kalina
> Priority: Blocker
> Fix For: 1.1.0.Beta20
>
>
> We previously discussed that when runAs is called on a SecurityIdentity this should pro-actively outflow to predefined security domains (which it has in trusted-security-domains?) so it does not need to be manually inflowed at a later point.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 3 months
[JBoss JIRA] (DROOLS-1411) OOPath constraint bugs emerged during dogfooding
by Matteo Mortari (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1411?page=com.atlassian.jira.plugi... ]
Matteo Mortari commented on DROOLS-1411:
----------------------------------------
Full recap of the splitted in the subtasks:
{code:java}
@Test
public void testWronglyMatchAlsoEquals() {
String drl =
"import org.drools.compiler.xpath.*;\n" +
"global java.util.Set duplicateNames; \n" +
"\n" +
"rule DIFF_FILES_BUT_WITH_SAME_FILENAME when\n" +
" $dir1 : TMFileSet( $ic1 : /files )\n" +
" TMFileSet( this == $dir1, $ic2 : /files{name == $ic1.name}, $ic1 != $ic2 )\n" +
"then\n" +
" System.out.println( $dir1 + \".: \" + $ic1 + \" \" + $ic2 );\n" +
" duplicateNames.add( $ic1.getName() );\n" +
"end\n";
KieSession ksession = new KieHelper().addContent( drl, ResourceType.DRL )
.build()
.newKieSession();
Set duplicateNames = new HashSet();
ksession.setGlobal("duplicateNames", duplicateNames);
TMFileSet x = new TMFileSet("X");
TMFile file0 = new TMFile("File0", 47);
TMFile file1 = new TMFile("File1", 47);
TMFile file2 = new TMFile("File0", 47);
x.getFiles().addAll(Arrays.asList(new TMFile[]{file0, file1, file2}));
ksession.insert(x);
ksession.fireAllRules();
assertTrue( duplicateNames.contains("File0") );
assertFalse( duplicateNames.contains("File1") );
}
@Test
public void testWronglyMatchAlsoEqualsBis() {
String drl =
"import org.drools.compiler.xpath.*;\n" +
"global java.util.Set duplicateNames; \n" +
"\n" +
"rule DIFF_FILES_BUT_WITH_SAME_FILENAME when\n" +
" $dir1 : TMFileSet( $ic1 : /files, $ic2 : /files{name == $ic1.name}, $ic1 != $ic2 )\n" +
"then\n" +
" System.out.println( $dir1 + \".: \" + $ic1 + \" \" + $ic2 );\n" +
" duplicateNames.add( $ic1.getName() );\n" +
"end\n";
KieSession ksession = new KieHelper().addContent( drl, ResourceType.DRL )
.build()
.newKieSession();
Set duplicateNames = new HashSet();
ksession.setGlobal("duplicateNames", duplicateNames);
TMFileSet x = new TMFileSet("X");
TMFile file0 = new TMFile("File0", 47);
TMFile file1 = new TMFile("File1", 47);
TMFile file2 = new TMFile("File0", 47);
x.getFiles().addAll(Arrays.asList(new TMFile[]{file0, file1, file2}));
ksession.insert(x);
ksession.fireAllRules();
assertTrue( duplicateNames.contains("File0") );
assertFalse( duplicateNames.contains("File1") );
}
@Test
public void testWronglyMatchAlsoEqualsTris() {
String drl =
"import org.drools.compiler.xpath.*;\n" +
"global java.util.Set duplicateNames; \n" +
"\n" +
"rule DIFF_FILES_BUT_WITH_SAME_FILENAME when\n" +
" $ic1 : TMFileWithParentObj( parent instanceof TMFileSet ,\n" +
" $curName : name,\n" +
" $ic2: /parent{#TMFileSet}/files{name == $curName, this != $ic1 } )\n" +
"then\n" +
" System.out.println( $ic1 + \" \" + $ic2 );\n" +
" duplicateNames.add( $ic1.getName() );\n" +
"end\n";
KieSession ksession = new KieHelper().addContent( drl, ResourceType.DRL )
.build()
.newKieSession();
Set duplicateNames = new HashSet();
ksession.setGlobal("duplicateNames", duplicateNames);
TMFileSet x = new TMFileSet("X");
TMFileWithParentObj file0 = new TMFileWithParentObj(0, "File0", 47, x);
TMFileWithParentObj file1 = new TMFileWithParentObj(1, "File1", 47, x);
TMFileWithParentObj file2 = new TMFileWithParentObj(2, "File0", 47, x);
x.getFiles().addAll(Arrays.asList(new TMFile[]{file0, file1, file2}));
ksession.insert( x );
ksession.insert( file0 );
ksession.insert( file1 );
ksession.insert( file2 );
ksession.fireAllRules();
assertTrue( duplicateNames.contains("File0") );
assertFalse( duplicateNames.contains("File1") );
}
public static class TMFileSetQuater extends AbstractReactiveObject {
private final String name;
private final Set<TMFileWithParentObj> members = new ReactiveSet<TMFileWithParentObj>();
public TMFileSetQuater(String name) {
this.name = name;
}
public String getName() {
return name;
}
public Set<TMFileWithParentObj> getFiles() {
return members;
}
}
@Test
public void testWronglyMatchAlsoEqualsQuater() {
String drl =
"import org.drools.compiler.xpath.*;\n" +
"import "+TMFileSetQuater.class.getCanonicalName()+";\n" +
"global java.util.Set duplicateNames; \n" +
"\n" +
"rule DIFF_FILES_BUT_WITH_SAME_FILENAME when\n" +
" $ic1 : TMFileWithParentObj( parent instanceof TMFileSetQuater ,\n" +
" $curName : name, $curId : id, \n" +
" $ic2: /parent{#TMFileSetQuater}/files{name == $curName, id != $curId } )\n" +
"then\n" +
" System.out.println( $ic1 + \" \" + $ic2 );\n" +
" duplicateNames.add( $ic1.getName() );\n" +
"end\n";
KieSession ksession = new KieHelper().addContent( drl, ResourceType.DRL )
.build()
.newKieSession();
Set duplicateNames = new HashSet();
ksession.setGlobal("duplicateNames", duplicateNames);
TMFileSetQuater x = new TMFileSetQuater("X");
TMFileWithParentObj file0 = new TMFileWithParentObj(0, "File0", 47, x);
TMFileWithParentObj file1 = new TMFileWithParentObj(1, "File1", 47, x);
TMFileWithParentObj file2 = new TMFileWithParentObj(2, "File0", 47, x);
x.getFiles().addAll(Arrays.asList(new TMFileWithParentObj[]{file0, file1, file2}));
ksession.insert( x );
ksession.insert( file0 );
ksession.insert( file1 );
ksession.insert( file2 );
ksession.fireAllRules();
assertTrue( duplicateNames.contains("File0") );
assertFalse( duplicateNames.contains("File1") );
}
{code}
> OOPath constraint bugs emerged during dogfooding
> ------------------------------------------------
>
> Key: DROOLS-1411
> URL: https://issues.jboss.org/browse/DROOLS-1411
> Project: Drools
> Issue Type: Bug
> Reporter: Matteo Mortari
> Assignee: Matteo Mortari
>
> Misc OOPath constraint bugs emerged during dogfooding using in DMN Validation rules
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 3 months
[JBoss JIRA] (DROOLS-1415) OOPath constraint bug4
by Matteo Mortari (JIRA)
Matteo Mortari created DROOLS-1415:
--------------------------------------
Summary: OOPath constraint bug4
Key: DROOLS-1415
URL: https://issues.jboss.org/browse/DROOLS-1415
Project: Drools
Issue Type: Sub-task
Reporter: Matteo Mortari
Assignee: Matteo Mortari
{code:java}
public static class TMFileSetQuater extends AbstractReactiveObject {
private final String name;
private final Set<TMFileWithParentObj> members = new ReactiveSet<TMFileWithParentObj>();
public TMFileSetQuater(String name) {
this.name = name;
}
public String getName() {
return name;
}
public Set<TMFileWithParentObj> getFiles() {
return members;
}
}
@Test
public void testWronglyMatchAlsoEqualsQuater() {
String drl =
"import org.drools.compiler.xpath.*;\n" +
"import "+TMFileSetQuater.class.getCanonicalName()+";\n" +
"global java.util.Set duplicateNames; \n" +
"\n" +
"rule DIFF_FILES_BUT_WITH_SAME_FILENAME when\n" +
" $ic1 : TMFileWithParentObj( parent instanceof TMFileSetQuater ,\n" +
" $curName : name, $curId : id, \n" +
" $ic2: /parent{#TMFileSetQuater}/files{name == $curName, id != $curId } )\n" +
"then\n" +
" System.out.println( $ic1 + \" \" + $ic2 );\n" +
" duplicateNames.add( $ic1.getName() );\n" +
"end\n";
KieSession ksession = new KieHelper().addContent( drl, ResourceType.DRL )
.build()
.newKieSession();
Set duplicateNames = new HashSet();
ksession.setGlobal("duplicateNames", duplicateNames);
TMFileSetQuater x = new TMFileSetQuater("X");
TMFileWithParentObj file0 = new TMFileWithParentObj(0, "File0", 47, x);
TMFileWithParentObj file1 = new TMFileWithParentObj(1, "File1", 47, x);
TMFileWithParentObj file2 = new TMFileWithParentObj(2, "File0", 47, x);
x.getFiles().addAll(Arrays.asList(new TMFileWithParentObj[]{file0, file1, file2}));
ksession.insert( x );
ksession.insert( file0 );
ksession.insert( file1 );
ksession.insert( file2 );
ksession.fireAllRules();
assertTrue( duplicateNames.contains("File0") );
assertFalse( duplicateNames.contains("File1") );
}
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 3 months
[JBoss JIRA] (DROOLS-1414) OOPath constraint bug3
by Matteo Mortari (JIRA)
Matteo Mortari created DROOLS-1414:
--------------------------------------
Summary: OOPath constraint bug3
Key: DROOLS-1414
URL: https://issues.jboss.org/browse/DROOLS-1414
Project: Drools
Issue Type: Sub-task
Reporter: Matteo Mortari
Assignee: Matteo Mortari
{code:java}
@Test
public void testWronglyMatchAlsoEqualsTris() {
String drl =
"import org.drools.compiler.xpath.*;\n" +
"global java.util.Set duplicateNames; \n" +
"\n" +
"rule DIFF_FILES_BUT_WITH_SAME_FILENAME when\n" +
" $ic1 : TMFileWithParentObj( parent instanceof TMFileSet ,\n" +
" $curName : name,\n" +
" $ic2: /parent{#TMFileSet}/files{name == $curName, this != $ic1 } )\n" +
"then\n" +
" System.out.println( $ic1 + \" \" + $ic2 );\n" +
" duplicateNames.add( $ic1.getName() );\n" +
"end\n";
KieSession ksession = new KieHelper().addContent( drl, ResourceType.DRL )
.build()
.newKieSession();
Set duplicateNames = new HashSet();
ksession.setGlobal("duplicateNames", duplicateNames);
TMFileSet x = new TMFileSet("X");
TMFileWithParentObj file0 = new TMFileWithParentObj(0, "File0", 47, x);
TMFileWithParentObj file1 = new TMFileWithParentObj(1, "File1", 47, x);
TMFileWithParentObj file2 = new TMFileWithParentObj(2, "File0", 47, x);
x.getFiles().addAll(Arrays.asList(new TMFile[]{file0, file1, file2}));
ksession.insert( x );
ksession.insert( file0 );
ksession.insert( file1 );
ksession.insert( file2 );
ksession.fireAllRules();
assertTrue( duplicateNames.contains("File0") );
assertFalse( duplicateNames.contains("File1") );
}
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 3 months
[JBoss JIRA] (DROOLS-1412) OOPath constraint bug1
by Matteo Mortari (JIRA)
Matteo Mortari created DROOLS-1412:
--------------------------------------
Summary: OOPath constraint bug1
Key: DROOLS-1412
URL: https://issues.jboss.org/browse/DROOLS-1412
Project: Drools
Issue Type: Sub-task
Reporter: Matteo Mortari
Assignee: Matteo Mortari
{code:java}
@Test
public void testWronglyMatchAlsoEquals() {
String drl =
"import org.drools.compiler.xpath.*;\n" +
"global java.util.Set duplicateNames; \n" +
"\n" +
"rule DIFF_FILES_BUT_WITH_SAME_FILENAME when\n" +
" $dir1 : TMFileSet( $ic1 : /files )\n" +
" TMFileSet( this == $dir1, $ic2 : /files{name == $ic1.name}, $ic1 != $ic2 )\n" +
"then\n" +
" System.out.println( $dir1 + \".: \" + $ic1 + \" \" + $ic2 );\n" +
" duplicateNames.add( $ic1.getName() );\n" +
"end\n";
KieSession ksession = new KieHelper().addContent( drl, ResourceType.DRL )
.build()
.newKieSession();
Set duplicateNames = new HashSet();
ksession.setGlobal("duplicateNames", duplicateNames);
TMFileSet x = new TMFileSet("X");
TMFile file0 = new TMFile("File0", 47);
TMFile file1 = new TMFile("File1", 47);
TMFile file2 = new TMFile("File0", 47);
x.getFiles().addAll(Arrays.asList(new TMFile[]{file0, file1, file2}));
ksession.insert(x);
ksession.fireAllRules();
assertTrue( duplicateNames.contains("File0") );
assertFalse( duplicateNames.contains("File1") );
}
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 3 months