<html><head> | |
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | |
<title>9.3 Creating proxies with CGLIB for Package Protected Types</title><link rel="stylesheet" href="css/stylesheet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="Virgo Programmer Guide"><link rel="up" href="ch09.html" title="9. Known Issues"><link rel="prev" href="ch09s02.html" title="9.2 ClassNotFoundError When Creating a Proxy"><link rel="next" href="ch09s04.html" title="9.4 Virgo Jetty Server Restrictions"><!--Begin Google Analytics code--><script type="text/javascript"> | |
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); | |
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); | |
</script><script type="text/javascript"> | |
var pageTracker = _gat._getTracker("UA-2728886-3"); | |
pageTracker._setDomainName("none"); | |
pageTracker._setAllowLinker(true); | |
pageTracker._trackPageview(); | |
</script><!--End Google Analytics code--></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">9.3 Creating proxies with CGLIB for Package Protected Types</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch09s02.html">Prev</a> </td><th width="60%" align="center">9. Known Issues</th><td width="20%" align="right"> <a accesskey="n" href="ch09s04.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="known.issues.cglib"></a>9.3 Creating proxies with CGLIB for Package Protected Types</h2></div></div></div><p> | |
In traditional Java EE applications user types are loaded by the same <code class="classname">ClassLoader</code> as | |
CGLIB. This allows CGLIB to proxy package-protected types. In OSGi environments, user types and CGLIB will | |
most likely be packaged in separate bundles. This results in the user types and CGLIB being loaded by | |
different <code class="classname">ClassLoaders</code>. This prevents CGLIB from proxying any package-protected types. | |
</p><p> | |
The workaround for this issue is to make all types that require proxying public. | |
</p></div><!--Begin LoopFuse code--><script src="http://loopfuse.net/webrecorder/js/listen.js" type="text/javascript"></script><script type="text/javascript"> | |
_lf_cid = "LF_48be82fa"; | |
_lf_remora(); | |
</script><!--End LoopFuse code--><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch09s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch09.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch09s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">9.2 ClassNotFoundError When Creating a Proxy </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 9.4 Virgo Jetty Server Restrictions</td></tr></table></div></body></html> |