[JBoss JIRA] (WFLY-10030) Add test for selection of ClusterNodeSelector into clustering testsuite
by Michal Jurc (JIRA)
[ https://issues.jboss.org/browse/WFLY-10030?page=com.atlassian.jira.plugin... ]
Michal Jurc updated WFLY-10030:
-------------------------------
Description: A test validating that the provided implementation of {{ClusterNodeSelecto}r} is being used by the EJB client to select the node of the cluster to route the request to should be added to WildFly testsuite.
> Add test for selection of ClusterNodeSelector into clustering testsuite
> -----------------------------------------------------------------------
>
> Key: WFLY-10030
> URL: https://issues.jboss.org/browse/WFLY-10030
> Project: WildFly
> Issue Type: Enhancement
> Components: Test Suite
> Affects Versions: 13.0.0.Beta1
> Reporter: Michal Jurc
> Assignee: tommaso borgato
>
> A test validating that the provided implementation of {{ClusterNodeSelecto}r} is being used by the EJB client to select the node of the cluster to route the request to should be added to WildFly testsuite.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 4 months
[JBoss JIRA] (WFLY-10029) bean-discovery-mode="annotated" is not working like described in the spec
by Ralph Soika (JIRA)
[ https://issues.jboss.org/browse/WFLY-10029?page=com.atlassian.jira.plugin... ]
Ralph Soika commented on WFLY-10029:
------------------------------------
yes exactly.
> bean-discovery-mode="annotated" is not working like described in the spec
> -------------------------------------------------------------------------
>
> Key: WFLY-10029
> URL: https://issues.jboss.org/browse/WFLY-10029
> Project: WildFly
> Issue Type: Bug
> Components: CDI / Weld
> Affects Versions: 10.1.0.Final
> Reporter: Ralph Soika
> Assignee: Martin Kouba
> Priority: Minor
> Labels: beans.xml
>
> I think we have a problem in Wildfly 10 concerning scanning of CDI Beans. Take a look at the following example:
> {code:java}
> @Stateless
> @LocalBean
> public class SomeService {
> ...
> }
> public class SomeClass {
> @EJB
> SomeService someService;
> ....
> }
> {code}
> We have a stateless session ejb an a bean which is not annotated with a scope but is injecting the service EJB. If you use a beans.xml with the tag:
> {noformat}
> bean-discovery-mode="annotated"
> {noformat}
> this works in wildfly 10 - the _someService_ is injected into the _someClass_ which is treated as a CDI bean. But this is not a correct behavior as stated in the specification. It says, that in this case only beans with a scope annotation should be treated as CDI which is not the case for SomeClass. Normally, as a developer, you would not complain much about this. So this is only a minor issue.
> I recognized this after I tried to run my application on Glassfish/Payara4 which did no longer work until I changed the beans.xml tag to:
> {noformat}
> bean-discovery-mode="all"
> {noformat}
> Now it works in both application servers. I think in wildfly we are misinterpreting the attribute "bean-discovery-mode". I think this should be changed in the next versions for EE8. I don't know if this behavior is a known issue and maybe it is still under development.
> I know also that with such a change some projects (also my own ones) will break. So maybe a new configuration switch like "strict-cdi-scanning" is helpful. What do you think?
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 4 months
[JBoss JIRA] (WFLY-10029) bean-discovery-mode="annotated" is not working like described in the spec
by Martin Kouba (JIRA)
[ https://issues.jboss.org/browse/WFLY-10029?page=com.atlassian.jira.plugin... ]
Martin Kouba commented on WFLY-10029:
-------------------------------------
So {{SomeClass}} maps to {{Plugin}} and {{SomeService}} maps to {{WorkflowService}}?
> bean-discovery-mode="annotated" is not working like described in the spec
> -------------------------------------------------------------------------
>
> Key: WFLY-10029
> URL: https://issues.jboss.org/browse/WFLY-10029
> Project: WildFly
> Issue Type: Bug
> Components: CDI / Weld
> Affects Versions: 10.1.0.Final
> Reporter: Ralph Soika
> Assignee: Martin Kouba
> Priority: Minor
> Labels: beans.xml
>
> I think we have a problem in Wildfly 10 concerning scanning of CDI Beans. Take a look at the following example:
> {code:java}
> @Stateless
> @LocalBean
> public class SomeService {
> ...
> }
> public class SomeClass {
> @EJB
> SomeService someService;
> ....
> }
> {code}
> We have a stateless session ejb an a bean which is not annotated with a scope but is injecting the service EJB. If you use a beans.xml with the tag:
> {noformat}
> bean-discovery-mode="annotated"
> {noformat}
> this works in wildfly 10 - the _someService_ is injected into the _someClass_ which is treated as a CDI bean. But this is not a correct behavior as stated in the specification. It says, that in this case only beans with a scope annotation should be treated as CDI which is not the case for SomeClass. Normally, as a developer, you would not complain much about this. So this is only a minor issue.
> I recognized this after I tried to run my application on Glassfish/Payara4 which did no longer work until I changed the beans.xml tag to:
> {noformat}
> bean-discovery-mode="all"
> {noformat}
> Now it works in both application servers. I think in wildfly we are misinterpreting the attribute "bean-discovery-mode". I think this should be changed in the next versions for EE8. I don't know if this behavior is a known issue and maybe it is still under development.
> I know also that with such a change some projects (also my own ones) will break. So maybe a new configuration switch like "strict-cdi-scanning" is helpful. What do you think?
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 4 months
[JBoss JIRA] (WFLY-10029) bean-discovery-mode="annotated" is not working like described in the spec
by Ralph Soika (JIRA)
[ https://issues.jboss.org/browse/WFLY-10029?page=com.atlassian.jira.plugin... ]
Ralph Soika edited comment on WFLY-10029 at 3/15/18 5:06 AM:
-------------------------------------------------------------
Yes, that question was probably inevitable ;-)
In one of my Service EJBs I use the following code to find a CDI Bean by name:
{code:java}
@Stateless
@LocalBean
public class WorkflowService {
....
@Inject
@Any
private Instance<Plugin> plugins;
private Plugin findPluginByName(String pluginClassName) {
if (pluginClassName == null || pluginClassName.isEmpty())
return null;
if (plugins == null || !plugins.iterator().hasNext()) {
logger.finest("......no CDI plugins injected");
return null;
}
// iterate over all injected plugins....
for (Plugin plugin : this.plugins) {
if (plugin.getClass().getName().equals(pluginClassName)) {
logger.finest("......CDI plugin '" + pluginClassName + "' successful injected");
return plugin;
}
}
return null;
}
....
{code}
You can see the full code on Github: https://github.com/imixs/imixs-workflow/blob/master/imixs-workflow-engine...
was (Author: rsoika):
Yes, that question was probably inevitable ;-)
In one of my Service EJBs I use the following code to find a CDI Bean by name:
{code:java}
@Inject
@Any
private Instance<Plugin> plugins;
private Plugin findPluginByName(String pluginClassName) {
if (pluginClassName == null || pluginClassName.isEmpty())
return null;
if (plugins == null || !plugins.iterator().hasNext()) {
logger.finest("......no CDI plugins injected");
return null;
}
// iterate over all injected plugins....
for (Plugin plugin : this.plugins) {
if (plugin.getClass().getName().equals(pluginClassName)) {
logger.finest("......CDI plugin '" + pluginClassName + "' successful injected");
return plugin;
}
}
return null;
}
{code}
You can see the full code on Github: https://github.com/imixs/imixs-workflow/blob/master/imixs-workflow-engine...
> bean-discovery-mode="annotated" is not working like described in the spec
> -------------------------------------------------------------------------
>
> Key: WFLY-10029
> URL: https://issues.jboss.org/browse/WFLY-10029
> Project: WildFly
> Issue Type: Bug
> Components: CDI / Weld
> Affects Versions: 10.1.0.Final
> Reporter: Ralph Soika
> Assignee: Martin Kouba
> Priority: Minor
> Labels: beans.xml
>
> I think we have a problem in Wildfly 10 concerning scanning of CDI Beans. Take a look at the following example:
> {code:java}
> @Stateless
> @LocalBean
> public class SomeService {
> ...
> }
> public class SomeClass {
> @EJB
> SomeService someService;
> ....
> }
> {code}
> We have a stateless session ejb an a bean which is not annotated with a scope but is injecting the service EJB. If you use a beans.xml with the tag:
> {noformat}
> bean-discovery-mode="annotated"
> {noformat}
> this works in wildfly 10 - the _someService_ is injected into the _someClass_ which is treated as a CDI bean. But this is not a correct behavior as stated in the specification. It says, that in this case only beans with a scope annotation should be treated as CDI which is not the case for SomeClass. Normally, as a developer, you would not complain much about this. So this is only a minor issue.
> I recognized this after I tried to run my application on Glassfish/Payara4 which did no longer work until I changed the beans.xml tag to:
> {noformat}
> bean-discovery-mode="all"
> {noformat}
> Now it works in both application servers. I think in wildfly we are misinterpreting the attribute "bean-discovery-mode". I think this should be changed in the next versions for EE8. I don't know if this behavior is a known issue and maybe it is still under development.
> I know also that with such a change some projects (also my own ones) will break. So maybe a new configuration switch like "strict-cdi-scanning" is helpful. What do you think?
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 4 months
[JBoss JIRA] (WFLY-10029) bean-discovery-mode="annotated" is not working like described in the spec
by Ralph Soika (JIRA)
[ https://issues.jboss.org/browse/WFLY-10029?page=com.atlassian.jira.plugin... ]
Ralph Soika commented on WFLY-10029:
------------------------------------
Yes, that question was probably inevitable ;-)
In one of my Service EJBs I use the following code to find a CDI Bean by name:
{code:java}
@Inject
@Any
private Instance<Plugin> plugins;
private Plugin findPluginByName(String pluginClassName) {
if (pluginClassName == null || pluginClassName.isEmpty())
return null;
if (plugins == null || !plugins.iterator().hasNext()) {
logger.finest("......no CDI plugins injected");
return null;
}
// iterate over all injected plugins....
for (Plugin plugin : this.plugins) {
if (plugin.getClass().getName().equals(pluginClassName)) {
logger.finest("......CDI plugin '" + pluginClassName + "' successful injected");
return plugin;
}
}
return null;
}
{code}
You can see the full code on Github: https://github.com/imixs/imixs-workflow/blob/master/imixs-workflow-engine...
> bean-discovery-mode="annotated" is not working like described in the spec
> -------------------------------------------------------------------------
>
> Key: WFLY-10029
> URL: https://issues.jboss.org/browse/WFLY-10029
> Project: WildFly
> Issue Type: Bug
> Components: CDI / Weld
> Affects Versions: 10.1.0.Final
> Reporter: Ralph Soika
> Assignee: Martin Kouba
> Priority: Minor
> Labels: beans.xml
>
> I think we have a problem in Wildfly 10 concerning scanning of CDI Beans. Take a look at the following example:
> {code:java}
> @Stateless
> @LocalBean
> public class SomeService {
> ...
> }
> public class SomeClass {
> @EJB
> SomeService someService;
> ....
> }
> {code}
> We have a stateless session ejb an a bean which is not annotated with a scope but is injecting the service EJB. If you use a beans.xml with the tag:
> {noformat}
> bean-discovery-mode="annotated"
> {noformat}
> this works in wildfly 10 - the _someService_ is injected into the _someClass_ which is treated as a CDI bean. But this is not a correct behavior as stated in the specification. It says, that in this case only beans with a scope annotation should be treated as CDI which is not the case for SomeClass. Normally, as a developer, you would not complain much about this. So this is only a minor issue.
> I recognized this after I tried to run my application on Glassfish/Payara4 which did no longer work until I changed the beans.xml tag to:
> {noformat}
> bean-discovery-mode="all"
> {noformat}
> Now it works in both application servers. I think in wildfly we are misinterpreting the attribute "bean-discovery-mode". I think this should be changed in the next versions for EE8. I don't know if this behavior is a known issue and maybe it is still under development.
> I know also that with such a change some projects (also my own ones) will break. So maybe a new configuration switch like "strict-cdi-scanning" is helpful. What do you think?
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 4 months
[JBoss JIRA] (WFLY-10029) bean-discovery-mode="annotated" is not working like described in the spec
by Ralph Soika (JIRA)
[ https://issues.jboss.org/browse/WFLY-10029?page=com.atlassian.jira.plugin... ]
Ralph Soika updated WFLY-10029:
-------------------------------
Description:
I think we have a problem in Wildfly 10 concerning scanning of CDI Beans. Take a look at the following example:
{code:java}
@Stateless
@LocalBean
public class SomeService {
...
}
public class SomeClass {
@EJB
SomeService someService;
....
}
{code}
We have a stateless session ejb an a bean which is not annotated with a scope but is injecting the service EJB. If you use a beans.xml with the tag:
{noformat}
bean-discovery-mode="annotated"
{noformat}
this works in wildfly 10 - the _someService_ is injected into the _someClass_ which is treated as a CDI bean. But this is not a correct behavior as stated in the specification. It says, that in this case only beans with a scope annotation should be treated as CDI which is not the case for SomeClass. Normally, as a developer, you would not complain much about this. So this is only a minor issue.
I recognized this after I tried to run my application on Glassfish/Payara4 which did no longer work until I changed the beans.xml tag to:
{noformat}
bean-discovery-mode="all"
{noformat}
Now it works in both application servers. I think in wildfly we are misinterpreting the attribute "bean-discovery-mode". I think this should be changed in the next versions for EE8. I don't know if this behavior is a known issue and maybe it is still under development.
I know also that with such a change some projects (also my own ones) will break. So maybe a new configuration switch like "strict-cdi-scanning" is helpful. What do you think?
was:
I think we have a problem in Wildfly 10 concerning scanning of CDI Beans. Take a look at the following example:
{code:java}
@Stateless
@LocalBean
public class SomeService {
...
}
public class SomeClass {
@EJB
SomeService someService;
....
}
{code}
We have a stateless session ejb an a bean which is not annotated with a scope but is injecting the service EJB. If you use a beans.xml with the tag:
{noformat}
bean-discovery-mode="annotated"
{noformat}
this works in wildfly 10 - the someService is injected into the someClass which is threaded as a CDI bean. But this is not correct behavior as stated in the specification. It says that in this case only beans with a scope annotation should be threaded as CDI which is not hte case for SomeClass. Normally as a developer you would not complain much about this.
I recognized this after I tried to run my application on Glassfish/Payara4 which did no longer work until I changge the beans.xml tag to:
{noformat}
bean-discovery-mode="all"
{noformat}
Now it works in both application servers. I think in wildfly we are misinterpreting the attribute "bean-discovery-mode". I think this should be changed in the next versions for EE8. I don't know if this behavior is a known issue and maybe it is still under development.
I know that with such a change some projects (also my own ones) will break. So maybe a new configuration switch like "strict-cdi-scanning" is helpful.
> bean-discovery-mode="annotated" is not working like described in the spec
> -------------------------------------------------------------------------
>
> Key: WFLY-10029
> URL: https://issues.jboss.org/browse/WFLY-10029
> Project: WildFly
> Issue Type: Bug
> Components: CDI / Weld
> Affects Versions: 10.1.0.Final
> Reporter: Ralph Soika
> Assignee: Martin Kouba
> Priority: Minor
> Labels: beans.xml
>
> I think we have a problem in Wildfly 10 concerning scanning of CDI Beans. Take a look at the following example:
> {code:java}
> @Stateless
> @LocalBean
> public class SomeService {
> ...
> }
> public class SomeClass {
> @EJB
> SomeService someService;
> ....
> }
> {code}
> We have a stateless session ejb an a bean which is not annotated with a scope but is injecting the service EJB. If you use a beans.xml with the tag:
> {noformat}
> bean-discovery-mode="annotated"
> {noformat}
> this works in wildfly 10 - the _someService_ is injected into the _someClass_ which is treated as a CDI bean. But this is not a correct behavior as stated in the specification. It says, that in this case only beans with a scope annotation should be treated as CDI which is not the case for SomeClass. Normally, as a developer, you would not complain much about this. So this is only a minor issue.
> I recognized this after I tried to run my application on Glassfish/Payara4 which did no longer work until I changed the beans.xml tag to:
> {noformat}
> bean-discovery-mode="all"
> {noformat}
> Now it works in both application servers. I think in wildfly we are misinterpreting the attribute "bean-discovery-mode". I think this should be changed in the next versions for EE8. I don't know if this behavior is a known issue and maybe it is still under development.
> I know also that with such a change some projects (also my own ones) will break. So maybe a new configuration switch like "strict-cdi-scanning" is helpful. What do you think?
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 4 months
[JBoss JIRA] (WFLY-10029) bean-discovery-mode="annotated" is not working like described in the spec
by Martin Kouba (JIRA)
[ https://issues.jboss.org/browse/WFLY-10029?page=com.atlassian.jira.plugin... ]
Martin Kouba commented on WFLY-10029:
-------------------------------------
Hi Raplh, how do you actually use/instantiate {{SomeClass}}?
> bean-discovery-mode="annotated" is not working like described in the spec
> -------------------------------------------------------------------------
>
> Key: WFLY-10029
> URL: https://issues.jboss.org/browse/WFLY-10029
> Project: WildFly
> Issue Type: Bug
> Components: CDI / Weld
> Affects Versions: 10.1.0.Final
> Reporter: Ralph Soika
> Assignee: Martin Kouba
> Priority: Minor
> Labels: beans.xml
>
> I think we have a problem in Wildfly 10 concerning scanning of CDI Beans. Take a look at the following example:
> {code:java}
> @Stateless
> @LocalBean
> public class SomeService {
> ...
> }
> public class SomeClass {
> @EJB
> SomeService someService;
> ....
> }
> {code}
> We have a stateless session ejb an a bean which is not annotated with a scope but is injecting the service EJB. If you use a beans.xml with the tag:
> {noformat}
> bean-discovery-mode="annotated"
> {noformat}
> this works in wildfly 10 - the _someService_ is injected into the _someClass_ which is treated as a CDI bean. But this is not a correct behavior as stated in the specification. It says, that in this case only beans with a scope annotation should be treated as CDI which is not the case for SomeClass. Normally, as a developer, you would not complain much about this. So this is only a minor issue.
> I recognized this after I tried to run my application on Glassfish/Payara4 which did no longer work until I changed the beans.xml tag to:
> {noformat}
> bean-discovery-mode="all"
> {noformat}
> Now it works in both application servers. I think in wildfly we are misinterpreting the attribute "bean-discovery-mode". I think this should be changed in the next versions for EE8. I don't know if this behavior is a known issue and maybe it is still under development.
> I know also that with such a change some projects (also my own ones) will break. So maybe a new configuration switch like "strict-cdi-scanning" is helpful. What do you think?
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 4 months
[JBoss JIRA] (WFLY-10029) bean-discovery-mode="annotated" is not working like described in the spec
by Ralph Soika (JIRA)
[ https://issues.jboss.org/browse/WFLY-10029?page=com.atlassian.jira.plugin... ]
Ralph Soika updated WFLY-10029:
-------------------------------
Description:
I think we have a problem in Wildfly 10 concerning scanning of CDI Beans. Take a look at the following example:
{code:java}
@Stateless
@LocalBean
public class SomeService {
...
}
public class SomeClass {
@EJB
SomeService someService;
....
}
{code}
We have a stateless session ejb an a bean which is not annotated with a scope but is injecting the service EJB. If you use a beans.xml with the tag:
{noformat}
bean-discovery-mode="annotated"
{noformat}
this works in wildfly 10 - the someService is injected into the someClass which is threaded as a CDI bean. But this is not correct behavior as stated in the specification. It says that in this case only beans with a scope annotation should be threaded as CDI which is not hte case for SomeClass. Normally as a developer you would not complain much about this.
I recognized this after I tried to run my application on Glassfish/Payara4 which did no longer work until I changge the beans.xml tag to:
{noformat}
bean-discovery-mode="all"
{noformat}
Now it works in both application servers. I think in wildfly we are misinterpreting the attribute "bean-discovery-mode". I think this should be changed in the next versions for EE8. I don't know if this behavior is a known issue and maybe it is still under development.
I know that with such a change some projects (also my own ones) will break. So maybe a new configuration switch like "strict-cdi-scanning" is helpful.
was:
I think we have a problem in Wildfly 10 concerning scanning of CDI Beans. Take a look at the following example:
{code:java}
@Stateless
@LocalBean
public class SomeService {
...
}
public class SomeClass {
@EJB
SomeService someService;
....
}
{code}
We have a stateless session ejb an a bean which is not annotated with a scope but is injecting the service EJB. If you use a beans.xml with the tag
{noformat}
bean-discovery-mode="annotated"
{noformat}
This works in wildfly 10. But this is not correct behavior as stated in the specification. It says that in this case only beans with a scope annotation should be threaded as CDI which is not hte case for SomeClass. Normally as a developer you would not complain much about this.
I recognized this after I tried to run my application on Glassfish/Payara4 which did no longer work until I changge the beans.xml tag to:
{noformat}
bean-discovery-mode="all"
{noformat}
Now it works in both application servers. I think in wildfly we are misinterpreting the attribute "bean-discovery-mode". I think this should be changed in the next versions for EE8. I don't know if this behavior is a known issue and maybe it is still under development.
I know that with such a change some projects (also my own ones) will break. So maybe a new configuration switch like "strict-cdi-scanning" is helpful.
> bean-discovery-mode="annotated" is not working like described in the spec
> -------------------------------------------------------------------------
>
> Key: WFLY-10029
> URL: https://issues.jboss.org/browse/WFLY-10029
> Project: WildFly
> Issue Type: Bug
> Components: CDI / Weld
> Affects Versions: 10.1.0.Final
> Reporter: Ralph Soika
> Assignee: Martin Kouba
> Priority: Minor
> Labels: beans.xml
>
> I think we have a problem in Wildfly 10 concerning scanning of CDI Beans. Take a look at the following example:
> {code:java}
> @Stateless
> @LocalBean
> public class SomeService {
> ...
> }
> public class SomeClass {
> @EJB
> SomeService someService;
> ....
> }
> {code}
> We have a stateless session ejb an a bean which is not annotated with a scope but is injecting the service EJB. If you use a beans.xml with the tag:
> {noformat}
> bean-discovery-mode="annotated"
> {noformat}
> this works in wildfly 10 - the someService is injected into the someClass which is threaded as a CDI bean. But this is not correct behavior as stated in the specification. It says that in this case only beans with a scope annotation should be threaded as CDI which is not hte case for SomeClass. Normally as a developer you would not complain much about this.
> I recognized this after I tried to run my application on Glassfish/Payara4 which did no longer work until I changge the beans.xml tag to:
> {noformat}
> bean-discovery-mode="all"
> {noformat}
> Now it works in both application servers. I think in wildfly we are misinterpreting the attribute "bean-discovery-mode". I think this should be changed in the next versions for EE8. I don't know if this behavior is a known issue and maybe it is still under development.
> I know that with such a change some projects (also my own ones) will break. So maybe a new configuration switch like "strict-cdi-scanning" is helpful.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 4 months