[JBoss JIRA] (AS7-4951) adding Security Domain children(Authentication, Authorization, Audit, Mapping) by json not working.
by Simeon Pinder (JIRA)
Simeon Pinder created AS7-4951:
----------------------------------
Summary: adding Security Domain children(Authentication,Authorization,Audit,Mapping) by json not working.
Key: AS7-4951
URL: https://issues.jboss.org/browse/AS7-4951
Project: Application Server 7
Issue Type: Bug
Components: CLI
Affects Versions: 7.1.2.Final (EAP)
Reporter: Simeon Pinder
Assignee: Alexey Loubyansky
-'Add' operation for Security Domain children(Authentication,Authorization,Audit,Mapping) 'fails with JBAS014746: login-modules may not be null'. The fail message is for Authentication specifically ..but the other nodes fail with matching provider-modules not be null,etc.
- Assumes there is a securityDomain of name 'testDomain3' with cache-type='default'.
-Once the Security Domain child does exist 'read-attribute' and 'write-attribute' operations work as expected via json. This indicates to me that the json values for 'login-modules' is sound but just not acceptable because of a bug.
- The same 'add' operation, see below, via cli completes successfully.
/subsystem=security/security-domain=testDomain3/authentication=classic:add(login-modules=[{"code"=>"SecureIdentity","flag"=>"required","module-options"=>{"bindDn"=>"uid=ldapSecureUser,ou=People,dc=redat,dc=com"}}])
- This is what the json contents look like before being sent off to the server. Switching 'add' to 'write-attribute' works correctly once the node already exists.:
{
"operation" : "add",
"address" : [ {
"subsystem" : "security"
}, {
"security-domain" : "testDomain3"
}, {
"authentication" : "classic"
} ],
"name" : "login-modules",
"value" : [ {
"flag" : "required",
"code" : "Ldap",
"module-options" : {
"bindDn" : "uid=ldapSecureUser,ou=People,dc=redat,dc=com",
"bindPw" : "test126",
"allowEmptyPasswords" : "true"
}
} ]
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 11 months
[JBoss JIRA] (JBRULES-3535) Planner: DistinctMoveSelector
by Geoffrey De Smet (JIRA)
Geoffrey De Smet created JBRULES-3535:
-----------------------------------------
Summary: Planner: DistinctMoveSelector
Key: JBRULES-3535
URL: https://issues.jboss.org/browse/JBRULES-3535
Project: Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: drools-planner
Reporter: Geoffrey De Smet
Assignee: Geoffrey De Smet
Priority: Minor
A shuffled move selector needs to cache, causing memory problems.
A just-in-time random move selector might produce duplicates.
Solution: put a DistinctMoveSelector in front of the just-in-time random move selector so it filters out moves that have already been iterated.
Note: make sure it's cleared properly during round-robin selection over multiple steps.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 11 months
[JBoss JIRA] Created: (JBRULES-2856) Encrypted passwords in the change-set.xml
by Alessandro Lazarotti (JIRA)
Encrypted passwords in the change-set.xml
-----------------------------------------
Key: JBRULES-2856
URL: https://issues.jboss.org/browse/JBRULES-2856
Project: Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Affects Versions: 5.1.1.FINAL
Environment: fedora 12, jdk 1.6, drools 5.1.0 expert
Reporter: Alessandro Lazarotti
Assignee: Mark Proctor
Currently the drools client API access Guvnor by creditials declared as plain-text in change-set.xml or property files. This is a security problem for many companies. Is very important develop a mechanism to obfuscate the password
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 11 months
[JBoss JIRA] (JBRULES-3378) ClassCastException when retrieving AgendaEventListener collection
by Mario Fusco (JIRA)
Mario Fusco created JBRULES-3378:
------------------------------------
Summary: ClassCastException when retrieving AgendaEventListener collection
Key: JBRULES-3378
URL: https://issues.jboss.org/browse/JBRULES-3378
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Reporter: Mario Fusco
Assignee: Mario Fusco
Following part of Spring configuration:
<bean id="debug-agenda-listener"
class="org.drools.event.DebugAgendaEventListener" />
<drools:ksession id="statefulSession" type="stateful" kbase="kbase1">
<drools:agendaEventListener ref="debug-agenda-listener"/>
</drools:ksession>
when trying to find out AgendaEventListener count registered in knowledge
stateful session, got this exception:
org.springframework.web.util.NestedServletException: Request processing failed;
nested exception is java.lang.ClassCastException:
org.jbpm.process.instance.ProcessRuntimeImpl$3 cannot be cast to
org.drools.event.rule.AgendaEventListener
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:656)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
root cause
java.lang.ClassCastException: org.jbpm.process.instance.ProcessRuntimeImpl$3
cannot be cast to org.drools.event.rule.AgendaEventListener
org.drools.impl.StatefulKnowledgeSessionImpl.getAgendaEventListeners(StatefulKnowledgeSessionImpl.java:182)
com.redhat.droolsspring.controllers.DroolsIntegrationStatefulTest.testAgendaListener(DroolsIntegrationStatefulTest.java:28)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:616)
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:174)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:421)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:409)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
See attachment 542456 [details]:
build as maven project, then deploy to tomcat, open webapp in browser and click
on the first link.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 11 months
[JBoss JIRA] (LOGTOOL-51) Logging generation processing breaks APT rules by loading classes via reflection
by Max Rydahl Andersen (JIRA)
[ https://issues.jboss.org/browse/LOGTOOL-51?page=com.atlassian.jira.plugin... ]
Max Rydahl Andersen commented on LOGTOOL-51:
--------------------------------------------
ah sorry - did not realize it had its own project :)
> Logging generation processing breaks APT rules by loading classes via reflection
> --------------------------------------------------------------------------------
>
> Key: LOGTOOL-51
> URL: https://issues.jboss.org/browse/LOGTOOL-51
> Project: Log Tool
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Environment: JBDS 5.5.0.CR1
> Reporter: Fred Bricon
> Assignee: David Lloyd
> Priority: Blocker
>
> JBDS 5.5.0.CR1 embeds [m2e-apt|https://github.com/jbosstools/m2e-apt], which automatically enables Eclipse JDT Annotation Processor Toolkit.
> When importing the [server|https://github.com/jbossas/jboss-as/tree/master/server] module from http://github.com/jbossas/jboss-as.git (also happens for other modules), Eclipse starts crashing (see JBIDE-12087) with errors like :
> {noformat}
> javax.xml.parsers.FactoryConfigurationError: Provider __redirected.__DocumentBuilderFactory not found
> at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:127)
> at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.decodeFactoryPath(FactoryPathUtil.java:222)
> at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.readFactoryPathFile(FactoryPathUtil.java:115)
> at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.calculatePath(FactoryPathUtil.java:342)
> at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.getFactoryPath(FactoryPathUtil.java:429)
> at org.eclipse.jdt.apt.core.internal.AnnotationProcessorFactoryLoader.getJava6FactoriesAndAttributesForProject(AnnotationProcessorFactoryLoader.java:420)
> at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:130)
> at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:813)
> at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:432)
> at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:364)
> at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:178)
> at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:301)
> at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:60)
> at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:254)
> at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:173)
> at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
> at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
> at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
> at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
> at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
> at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
> at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
> Caused by: java.lang.ClassNotFoundException: __redirected/__DocumentBuilderFactory
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:264)
> at javax.xml.parsers.FactoryFinder.getProviderClass(FactoryFinder.java:119)
> at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:144)
> at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:185)
> at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:121)
> {noformat}
> It turns out the Eclipse System Properties have been changed to use javax.xml.parsers.SAXParserFactory=__redirected/__DocumentBuilderFactory
> I tracked the code responsible with messing with the properties :
> {noformat}
> Thread [Worker-24] (Suspended (breakpoint at line 779 in System))
> System.setProperty(String, String) line: 779
> __SAXParserFactory.<clinit>() line: 68
> __JAXPRedirected.initAll() line: 80
> Module$1.run() line: 126
> Module$1.run() line: 113
> AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]
> Module.<clinit>() line: 113
> Class<T>.forName0(String, boolean, ClassLoader) line: not available [native method]
> Class<T>.forName(String) line: 186 <====== org.jboss.modules.Module
> JCodeModel.ref(String) line: 363
> MessageBundleImplementor(ImplementationClassModel).createBundleMethod(MessageMethod, JMethod, JMethod, JVar) line: 150
> MessageBundleImplementor.generateModel() line: 86
> MessageBundleImplementor(ClassModel).create(JavaFileObject) line: 104
> ImplementationClassGenerator.processTypeElement(TypeElement, TypeElement, MessageInterface) line: 63
> LoggingToolsProcessor.process(Set<TypeElement>, RoundEnvironment) line: 155
> RoundDispatcher.handleProcessor(ProcessorInfo) line: 139
> RoundDispatcher.round() line: 121
> IdeAnnotationProcessorManager(BaseAnnotationProcessorManager).processAnnotations(CompilationUnitDeclaration[], ReferenceBinding[], boolean) line: 159
> IdeAnnotationProcessorManager.processAnnotations(CompilationUnitDeclaration[], ReferenceBinding[], boolean) line: 134
> Compiler.processAnnotations() line: 813
> Compiler.compile(ICompilationUnit[]) line: 432
> BatchImageBuilder(AbstractImageBuilder).compile(SourceFile[], SourceFile[], boolean) line: 364
> BatchImageBuilder.compile(SourceFile[], SourceFile[], boolean) line: 178
> BatchImageBuilder(AbstractImageBuilder).compile(SourceFile[]) line: 301
> BatchImageBuilder.build() line: 60
> JavaBuilder.buildAll() line: 254
> JavaBuilder.build(int, Map, IProgressMonitor) line: 173
> BuildManager$2.run() line: 728
> SafeRunner.run(ISafeRunnable) line: 42
> BuildManager.basicBuild(int, IncrementalProjectBuilder, Map<String,String>, MultiStatus, IProgressMonitor) line: 199
> BuildManager.basicBuild(IBuildConfiguration, int, IBuildContext, ICommand[], MultiStatus, IProgressMonitor) line: 239
> BuildManager$1.run() line: 292
> SafeRunner.run(ISafeRunnable) line: 42
> BuildManager.basicBuild(IBuildConfiguration, int, IBuildContext, MultiStatus, IProgressMonitor) line: 295
> BuildManager.basicBuildLoop(IBuildConfiguration[], IBuildConfiguration[], int, MultiStatus, IProgressMonitor) line: 351
> BuildManager.build(IBuildConfiguration[], IBuildConfiguration[], int, IProgressMonitor) line: 374
> AutoBuildJob.doBuild(IProgressMonitor) line: 143
> AutoBuildJob.run(IProgressMonitor) line: 241
> Worker.run() line: 54
> {noformat}
> That stacktrace represents the processing of https://github.com/jbossas/jboss-as/blob/master/server/src/main/java/org/...
> So basically, whenever a Logger has a dependency to the [org.jboss.modules.Module|https://github.com/jbossas/jboss-modules/blob/ma...] class, stuff starts hitting the fan.
> Classes should not be loaded by reflection during APT processing to avoid such issues - it should use the API provided by APT to iterate over the classes metadata provided by the compiler and not depend on com.sun.*.internal classes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 11 months
[JBoss JIRA] (LOGTOOL-51) Logging generation processing breaks APT rules by loading classes via reflection
by David Lloyd (JIRA)
[ https://issues.jboss.org/browse/LOGTOOL-51?page=com.atlassian.jira.plugin... ]
David Lloyd commented on LOGTOOL-51:
------------------------------------
Meaning I had to move the issue again. But it's all OK.
> Logging generation processing breaks APT rules by loading classes via reflection
> --------------------------------------------------------------------------------
>
> Key: LOGTOOL-51
> URL: https://issues.jboss.org/browse/LOGTOOL-51
> Project: Log Tool
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Environment: JBDS 5.5.0.CR1
> Reporter: Fred Bricon
> Assignee: David Lloyd
> Priority: Blocker
>
> JBDS 5.5.0.CR1 embeds [m2e-apt|https://github.com/jbosstools/m2e-apt], which automatically enables Eclipse JDT Annotation Processor Toolkit.
> When importing the [server|https://github.com/jbossas/jboss-as/tree/master/server] module from http://github.com/jbossas/jboss-as.git (also happens for other modules), Eclipse starts crashing (see JBIDE-12087) with errors like :
> {noformat}
> javax.xml.parsers.FactoryConfigurationError: Provider __redirected.__DocumentBuilderFactory not found
> at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:127)
> at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.decodeFactoryPath(FactoryPathUtil.java:222)
> at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.readFactoryPathFile(FactoryPathUtil.java:115)
> at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.calculatePath(FactoryPathUtil.java:342)
> at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.getFactoryPath(FactoryPathUtil.java:429)
> at org.eclipse.jdt.apt.core.internal.AnnotationProcessorFactoryLoader.getJava6FactoriesAndAttributesForProject(AnnotationProcessorFactoryLoader.java:420)
> at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:130)
> at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:813)
> at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:432)
> at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:364)
> at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:178)
> at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:301)
> at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:60)
> at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:254)
> at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:173)
> at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
> at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
> at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
> at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
> at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
> at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
> at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
> Caused by: java.lang.ClassNotFoundException: __redirected/__DocumentBuilderFactory
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:264)
> at javax.xml.parsers.FactoryFinder.getProviderClass(FactoryFinder.java:119)
> at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:144)
> at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:185)
> at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:121)
> {noformat}
> It turns out the Eclipse System Properties have been changed to use javax.xml.parsers.SAXParserFactory=__redirected/__DocumentBuilderFactory
> I tracked the code responsible with messing with the properties :
> {noformat}
> Thread [Worker-24] (Suspended (breakpoint at line 779 in System))
> System.setProperty(String, String) line: 779
> __SAXParserFactory.<clinit>() line: 68
> __JAXPRedirected.initAll() line: 80
> Module$1.run() line: 126
> Module$1.run() line: 113
> AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]
> Module.<clinit>() line: 113
> Class<T>.forName0(String, boolean, ClassLoader) line: not available [native method]
> Class<T>.forName(String) line: 186 <====== org.jboss.modules.Module
> JCodeModel.ref(String) line: 363
> MessageBundleImplementor(ImplementationClassModel).createBundleMethod(MessageMethod, JMethod, JMethod, JVar) line: 150
> MessageBundleImplementor.generateModel() line: 86
> MessageBundleImplementor(ClassModel).create(JavaFileObject) line: 104
> ImplementationClassGenerator.processTypeElement(TypeElement, TypeElement, MessageInterface) line: 63
> LoggingToolsProcessor.process(Set<TypeElement>, RoundEnvironment) line: 155
> RoundDispatcher.handleProcessor(ProcessorInfo) line: 139
> RoundDispatcher.round() line: 121
> IdeAnnotationProcessorManager(BaseAnnotationProcessorManager).processAnnotations(CompilationUnitDeclaration[], ReferenceBinding[], boolean) line: 159
> IdeAnnotationProcessorManager.processAnnotations(CompilationUnitDeclaration[], ReferenceBinding[], boolean) line: 134
> Compiler.processAnnotations() line: 813
> Compiler.compile(ICompilationUnit[]) line: 432
> BatchImageBuilder(AbstractImageBuilder).compile(SourceFile[], SourceFile[], boolean) line: 364
> BatchImageBuilder.compile(SourceFile[], SourceFile[], boolean) line: 178
> BatchImageBuilder(AbstractImageBuilder).compile(SourceFile[]) line: 301
> BatchImageBuilder.build() line: 60
> JavaBuilder.buildAll() line: 254
> JavaBuilder.build(int, Map, IProgressMonitor) line: 173
> BuildManager$2.run() line: 728
> SafeRunner.run(ISafeRunnable) line: 42
> BuildManager.basicBuild(int, IncrementalProjectBuilder, Map<String,String>, MultiStatus, IProgressMonitor) line: 199
> BuildManager.basicBuild(IBuildConfiguration, int, IBuildContext, ICommand[], MultiStatus, IProgressMonitor) line: 239
> BuildManager$1.run() line: 292
> SafeRunner.run(ISafeRunnable) line: 42
> BuildManager.basicBuild(IBuildConfiguration, int, IBuildContext, MultiStatus, IProgressMonitor) line: 295
> BuildManager.basicBuildLoop(IBuildConfiguration[], IBuildConfiguration[], int, MultiStatus, IProgressMonitor) line: 351
> BuildManager.build(IBuildConfiguration[], IBuildConfiguration[], int, IProgressMonitor) line: 374
> AutoBuildJob.doBuild(IProgressMonitor) line: 143
> AutoBuildJob.run(IProgressMonitor) line: 241
> Worker.run() line: 54
> {noformat}
> That stacktrace represents the processing of https://github.com/jbossas/jboss-as/blob/master/server/src/main/java/org/...
> So basically, whenever a Logger has a dependency to the [org.jboss.modules.Module|https://github.com/jbossas/jboss-modules/blob/ma...] class, stuff starts hitting the fan.
> Classes should not be loaded by reflection during APT processing to avoid such issues - it should use the API provided by APT to iterate over the classes metadata provided by the compiler and not depend on com.sun.*.internal classes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 11 months
[JBoss JIRA] (JGRP-1476) TCP: double-write is useless as output stream is buffered
by Bela Ban (JIRA)
Bela Ban created JGRP-1476:
------------------------------
Summary: TCP: double-write is useless as output stream is buffered
Key: JGRP-1476
URL: https://issues.jboss.org/browse/JGRP-1476
Project: JGroups
Issue Type: Enhancement
Reporter: Bela Ban
Assignee: Bela Ban
Priority: Minor
Fix For: 3.0.11, 3.1
[Stanimir Simeonoff]
Now I'd like to report a relatively minor issue w/ TCPConnection.doSend and
'double-writes' per Unix Network Programming.
The body of the method is like follows:
private void doSend(byte[] data, int offset, int length) throws
Exception {
// we're using 'double-writes', sending the buffer to the
destination in 2 pieces. this would
// ensure that, if the peer closed the connection while we were
idle, we would get an exception.
// this won't happen if we use a single write (see Stevens, ch.
5.13).
out.writeInt(length); // write the length of the data buffer
first
*Util.doubleWrite(data, offset, length, out)*;// should be
just: out.write(data, offset, length);
out.flush(); // may not be very efficient (but safe)
}
The comment claims it uses 'double-writes' in order to capture a missing
connection close by the peer. Firstly, that misled me there were not
buffers involved, so it writes straight to the socket output stream but in
that case out.flush() is a NOP.
If that was the case there would be at least 6 packets(!) per message (when
naggling is disabled) - 4 separate calls to each byte of writeInt and then
2 more for Util.doubleWrite. That looked very suspicious and must have been
caught, so I took a look at the out declaration and it's buffered via
BufferedOutputStream with default 8k buf size which is the better size on
linux (buffers less than 8k are allocated on the stack instead of
malloc/free).
However that means doubleWrite is totally not useful as the output is
buffered anyways.
Also double-write is not useful if there is a reading/polling as RST would
be caught immediately, closing the connection. It's useful only if there is
no reading on the socket and that's quite a corner case.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 11 months