rework use of ClassLoaders, see #1736
This commit is contained in:
parent
c5fc153a10
commit
ac1ee9ae91
13 changed files with 54 additions and 67 deletions
|
|
@ -321,8 +321,9 @@ abstract class MessageDispatcherConfigurator(val config: Config, val prerequisit
|
|||
BoundedMailbox(capacity, duration)
|
||||
}
|
||||
case fqcn ⇒
|
||||
val constructorSignature = Array[Class[_]](classOf[Config])
|
||||
ReflectiveAccess.createInstance[MailboxType](fqcn, constructorSignature, Array[AnyRef](config)) match {
|
||||
val args = Seq(classOf[Config] -> config)
|
||||
val loader = Option(Thread.currentThread.getContextClassLoader) getOrElse getClass.getClassLoader
|
||||
ReflectiveAccess.createInstance[MailboxType](fqcn, args, loader) match {
|
||||
case Right(instance) ⇒ instance
|
||||
case Left(exception) ⇒
|
||||
throw new IllegalArgumentException(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue