[
https://issues.jboss.org/browse/FORGE-1303?page=com.atlassian.jira.plugin...
]
Lincoln Baxter III commented on FORGE-1303:
-------------------------------------------
Well, we obviously try not to rely on TCCL, but there's a chance that addons may use
it. But really I think the only reason that we overrode this was because Weld's
default singleton provider has some print-out statements in it that we didn't want to
show up on the console.
{code}
public void set(T object) {
// TODO remove this
System.out.println("Adding singleton for " + getClassLoader());
store.put(getClassLoader(), object);
}
{code}
Use Weld's new Singleton API
----------------------------
Key: FORGE-1303
URL:
https://issues.jboss.org/browse/FORGE-1303
Project: Forge
Issue Type: Task
Components: Furnace (Container)
Reporter: Jozef Hartinger
Since Weld 2.1 it is possible to use the new Singleton API
http://docs.jboss.org/weld/javadoc/2.1/weld-spi/org/jboss/weld/bootstrap/...
A String identifier was added to all Singleton's methods. The identifier is used to
identify a Weld container. As a result, it is no longer necessary to use the TCCL to
identify the right Weld container.
I am not sure if Forge currently sets the TCCL just because Weld required it in the past
or if it is used for something else but either way the new SPI should simplify
integration.
For each module Forge should generate a unique id and pass it to Weld when calling
WeldBootstrap.startContainer().
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira