[JBoss JIRA] (JGRP-2218) New buffers
by Bela Ban (JIRA)
Bela Ban created JGRP-2218:
------------------------------
Summary: New buffers
Key: JGRP-2218
URL: https://issues.jboss.org/browse/JGRP-2218
Project: JGroups
Issue Type: Feature Request
Reporter: Bela Ban
Assignee: Bela Ban
Fix For: 5.0
h3. Goal
Change payload in {{Message}} from byte[] arrays to a {{Buffer}} interface which can have multiple implementations.
h3. Motivation
Currently, having to pass a byte[] array to a message leads to unnecessary copying:
* When an application has a ref to an NIO (direct) {{ByteBuffer}}, the bytes in the byte buffer have to be copied into a byte[] array and then set in the message
* When the application sends around byte[] arrays, but also wants to add some additional metadata, e.g. type (1000-byte requests/responses), it needs to create a new byte[] array of (say) 1001 bytes and copy the data (1000 bytes) plus the request type (1 byte) into the new copy. Example: {{MPerf}} and {{UPerf}}
h3. Design
Instead of copying, the application creates an instance of {{Buffer}} and sets the buffer in {{Message}}. The {{Buffer}} is then passed all the way down into the transport where it is marshalled and sent. There can be a number of buffer implementations, e.g.
* {{ArrayBuffer}}: wraps a byte[] array with an offset and length
* {{NioDirectBuffer}}: wraps an NIO direct {{ByteBuffer}}
* {{NioHeapBuffer}}: wraps an NIO heap-based {{ByteBuffer}}
* {{CompositeBuffer}}: wraps multiple Buffers. E.g. type (1 byte) and data (1000 bytes) as described above
* {{IntBuffer}}: a single integer
* {{PartialBuffer}}: a ref to a {{Buffer}}, with an offset and length
The {{Buffer}} interface has methods {{size()}}, {{writeTo(DataOutput)}}, {{readFrom(DataInput)}}, possibly also {{acquire()}} and {{release()}} (for ref-counting).
Each buffer impl has an ID and it should be possible to register new impls. A {{BufferFactory}} maintains a mapping between IDs and impl classes.
When marshalling a {{Buffer}}, the ID is written first, followed by the buffer's {{writeTo()}} method. When reading buffers, the {{BufferFactory}} is used to create instances from IDs.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 9 months
[JBoss JIRA] (WFLY-9240) SecurityDomain.getCurrent() throws NPE when invoking SLSB using a Weld thread
by Martin Kouba (JIRA)
[ https://issues.jboss.org/browse/WFLY-9240?page=com.atlassian.jira.plugin.... ]
Martin Kouba updated WFLY-9240:
-------------------------------
Description:
-The integration code used by Weld 3 to propagate the security context of the current thread to different threads (needed for async events CDI 2.0 feature) is not able to obtain the current {{org.wildfly.security.auth.server.SecurityDomain}} anymore.-
-The invocation of [SecurityDomain.getCurrent()|https://github.com/weld/wildfly/blob/11.0.0.B...] returns {{null}}.-
UPDATE: The original description was wrong. We wrongly assumed that Elytron is active for a deployment by default which isn't the case.
NullPointerException being reported DURING calls to SecurityDomain.getCurrent():
{noformat}
Caused by: java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
at org.wildfly.security.auth.server.SecurityDomain.getCurrent(SecurityDomain.java:171)
at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:74)
at org.jboss.weld.tests.event.async.context.security.Printer$$$view2.print(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.weld.util.reflection.Reflections.invokeAndUnwrap(Reflections.java:411)
at org.jboss.weld.module.ejb.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:128)
at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)
at org.jboss.weld.module.ejb.InjectionPointPropagatingEnterpriseTargetBeanInstance.invoke(InjectionPointPropagatingEnterpriseTargetBeanInstance.java:68)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:106)
at org.jboss.weld.tests.event.async.context.security.Printer$Proxy$_$$_Weld$EnterpriseProxy$.print(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
{noformat}
Note that this worked on WildFly *11.0.0.Alpha1*.
It's also possible that the test (see also steps to reproduce) is wrong. A review/help from a security expert would be appreciated.
was:
-The integration code used by Weld 3 to propagate the security context of the current thread to different threads (needed for async events CDI 2.0 feature) is not able to obtain the current {{org.wildfly.security.auth.server.SecurityDomain}} anymore. -
-The invocation of [SecurityDomain.getCurrent()|https://github.com/weld/wildfly/blob/11.0.0.B...] returns {{null}}.
-
NullPointerException being reported DURING calls to SecurityDomain.getCurrent(): -
{noformat}
Caused by: java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
at org.wildfly.security.auth.server.SecurityDomain.getCurrent(SecurityDomain.java:171)
at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:74)
at org.jboss.weld.tests.event.async.context.security.Printer$$$view2.print(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.weld.util.reflection.Reflections.invokeAndUnwrap(Reflections.java:411)
at org.jboss.weld.module.ejb.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:128)
at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)
at org.jboss.weld.module.ejb.InjectionPointPropagatingEnterpriseTargetBeanInstance.invoke(InjectionPointPropagatingEnterpriseTargetBeanInstance.java:68)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:106)
at org.jboss.weld.tests.event.async.context.security.Printer$Proxy$_$$_Weld$EnterpriseProxy$.print(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
{noformat}
Note that this worked on WildFly *11.0.0.Alpha1*.
It's also possible that the test (see also steps to reproduce) is wrong. A review/help from a security expert would be appreciated.
> SecurityDomain.getCurrent() throws NPE when invoking SLSB using a Weld thread
> -----------------------------------------------------------------------------
>
> Key: WFLY-9240
> URL: https://issues.jboss.org/browse/WFLY-9240
> Project: WildFly
> Issue Type: Bug
> Components: CDI / Weld, Security
> Affects Versions: 11.0.0.Beta1, 11.0.0.CR1
> Reporter: Martin Kouba
> Assignee: Darran Lofthouse
> Priority: Critical
>
> -The integration code used by Weld 3 to propagate the security context of the current thread to different threads (needed for async events CDI 2.0 feature) is not able to obtain the current {{org.wildfly.security.auth.server.SecurityDomain}} anymore.-
> -The invocation of [SecurityDomain.getCurrent()|https://github.com/weld/wildfly/blob/11.0.0.B...] returns {{null}}.-
> UPDATE: The original description was wrong. We wrongly assumed that Elytron is active for a deployment by default which isn't the case.
> NullPointerException being reported DURING calls to SecurityDomain.getCurrent():
> {noformat}
> Caused by: java.lang.NullPointerException
> at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
> at org.wildfly.security.auth.server.SecurityDomain.getCurrent(SecurityDomain.java:171)
> at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:74)
> at org.jboss.weld.tests.event.async.context.security.Printer$$$view2.print(Unknown Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.jboss.weld.util.reflection.Reflections.invokeAndUnwrap(Reflections.java:411)
> at org.jboss.weld.module.ejb.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:128)
> at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)
> at org.jboss.weld.module.ejb.InjectionPointPropagatingEnterpriseTargetBeanInstance.invoke(InjectionPointPropagatingEnterpriseTargetBeanInstance.java:68)
> at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:106)
> at org.jboss.weld.tests.event.async.context.security.Printer$Proxy$_$$_Weld$EnterpriseProxy$.print(Unknown Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> {noformat}
> Note that this worked on WildFly *11.0.0.Alpha1*.
> It's also possible that the test (see also steps to reproduce) is wrong. A review/help from a security expert would be appreciated.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 9 months
[JBoss JIRA] (WFLY-9240) SecurityDomain.getCurrent() throws NPE when invoking SLSB using a Weld thread
by Martin Kouba (JIRA)
[ https://issues.jboss.org/browse/WFLY-9240?page=com.atlassian.jira.plugin.... ]
Martin Kouba updated WFLY-9240:
-------------------------------
Summary: SecurityDomain.getCurrent() throws NPE when invoking SLSB using a Weld thread (was: WeldSecurityServices not able to obtain the current SecurityDomain anymore)
> SecurityDomain.getCurrent() throws NPE when invoking SLSB using a Weld thread
> -----------------------------------------------------------------------------
>
> Key: WFLY-9240
> URL: https://issues.jboss.org/browse/WFLY-9240
> Project: WildFly
> Issue Type: Bug
> Components: CDI / Weld, Security
> Affects Versions: 11.0.0.Beta1, 11.0.0.CR1
> Reporter: Martin Kouba
> Assignee: Darran Lofthouse
> Priority: Critical
>
> -The integration code used by Weld 3 to propagate the security context of the current thread to different threads (needed for async events CDI 2.0 feature) is not able to obtain the current {{org.wildfly.security.auth.server.SecurityDomain}} anymore. -
> -The invocation of [SecurityDomain.getCurrent()|https://github.com/weld/wildfly/blob/11.0.0.B...] returns {{null}}.
> -
> NullPointerException being reported DURING calls to SecurityDomain.getCurrent(): -
> {noformat}
> Caused by: java.lang.NullPointerException
> at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
> at org.wildfly.security.auth.server.SecurityDomain.getCurrent(SecurityDomain.java:171)
> at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:74)
> at org.jboss.weld.tests.event.async.context.security.Printer$$$view2.print(Unknown Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.jboss.weld.util.reflection.Reflections.invokeAndUnwrap(Reflections.java:411)
> at org.jboss.weld.module.ejb.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:128)
> at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)
> at org.jboss.weld.module.ejb.InjectionPointPropagatingEnterpriseTargetBeanInstance.invoke(InjectionPointPropagatingEnterpriseTargetBeanInstance.java:68)
> at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:106)
> at org.jboss.weld.tests.event.async.context.security.Printer$Proxy$_$$_Weld$EnterpriseProxy$.print(Unknown Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> {noformat}
> Note that this worked on WildFly *11.0.0.Alpha1*.
> It's also possible that the test (see also steps to reproduce) is wrong. A review/help from a security expert would be appreciated.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 9 months
[JBoss JIRA] (WFLY-9341) Unignore MessagingClientTestCase.testMessagingClientUsingMessagingPort
by Miroslav Novak (JIRA)
Miroslav Novak created WFLY-9341:
------------------------------------
Summary: Unignore MessagingClientTestCase.testMessagingClientUsingMessagingPort
Key: WFLY-9341
URL: https://issues.jboss.org/browse/WFLY-9341
Project: WildFly
Issue Type: Task
Components: Test Suite
Affects Versions: 11.0.0.CR1
Reporter: Miroslav Novak
Assignee: Miroslav Novak
Priority: Minor
Ignore MessagingClientTestCase#testMessagingClientUsingMessagingPort test. Smoke test whether JMS client can connect directly to messaging.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 9 months