[ 
https://issues.apache.org/jira/browse/PIVOT-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13051087#comment-13051087
 ] 

Andrei Pozolotin commented on PIVOT-687:
----------------------------------------

@Sandro:

in my opinion, the use of both BXMLSerializer(classLoader) & TCCL is major 
incosistency;
(which resulted in bug addressed by patch_2011-06-15_bxml-classloader.patch)
since all of pivot-wtk uses TCCL, it sort of dictates that pivot-core  must use 
TCCL as well.

@GBivins:

can you please confirm that "TCCL bracket" (below) is a working replacement for 
"BXMLSerializer(classLoader)":

@Override
public final void run() {
final Thread thread = Thread.currentThread();
final ClassLoader pastLoader = thread.getContextClassLoader();
final ClassLoader thisLoader = getClass().getClassLoader();
try {
thread.setContextClassLoader(thisLoader);
/* INIT YOUR BXML HERE; BOTH PIVOT-CORE & PIVOT-WTK WILL USE thisLoader NOW */
} catch (Throwable e) {
log.error("", e);
} finally {
thread.setContextClassLoader(pastLoader);
}
} 



> BXMLSerializer, would like to be able to specify a classloader for loading 
> custom components
> --------------------------------------------------------------------------------------------
>
>                 Key: PIVOT-687
>                 URL: https://issues.apache.org/jira/browse/PIVOT-687
>             Project: Pivot
>          Issue Type: Improvement
>          Components: core-beans
>    Affects Versions: 2.0
>         Environment: all
>            Reporter: GBivins
>            Assignee: Sandro Martini
>             Fix For: 2.0.1
>
>         Attachments: patch.patch, patch2.patch
>
>
> I'm running into issues trying to load my pivot window into a swing 
> application. Some background,
> since pivot 2.0 can load components into a swing application, I've been 
> trying to integrate pivot into a netbeans platform application.
> Only been at it a couple of hours but I'm stuck on an class loader issue. 
> Basically, because I have pivot wrapped in separate module it's classloader
> can't references classes in any modules that depend on it. See here:
> http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/classpath.html#loader-hier
> I looked briefly in the docs but I'm not sure if I missed a readObject() 
> signature that will allow me to pass in the classloader to use when 
> de-serializing.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to