Enhancement 407 : Enable the use of ebean.search.jars for JBoss AS7
Priority 
Low
Reported Version 
 
Logged By 
Vaughn Butt
Status 
Fixed
Fixed Version 
2.8.1
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
22/06/2012
Updated 
22/06/2012
Type 
Enhancement
 
Attachments 
No attachments

It appears that using the property ebean.search.jars does not work on JBoss AS7 and Ebean-2.7.7.

It would be useful to be able to use ebean.search.jars and ebean.search.packages in JBoss AS 7.

There is a workaround which is why I created the enhancement request with low priority. The workaround that I can see is to register the Entity classes by specifing them individually with the ebean..classes property.<\/p><p>I think the problem arises because the ClassLoader passed to DefaultClassPathReader.readPath(ClassLoader) is of type ModuleClassLoader (<a href="http://grepcode.com/file/repository.jboss.org/nexus/content/repositories/releases/org.jboss.modules/jboss-modules/1.1.1.GA/org/jboss/modules/ModuleClassLoader.java?av">http://grepcode.com/file/repository.jboss.org/nexus/content/repositories/releases/org.jboss.modules/jboss-modules/1.1.1.GA/org/jboss/modules/ModuleClassLoader.java?av<\/a>=f) which does not have a method getClassPath (or getClasspath).<\/p><\/span><\/div><\/td> <\/tr> <tr> <td colspan="6"> <\/td> <\/tr> <\/table> <div class="bugdetail-head"> <div style="float:right"> Vaughn Butt 29 Jul 22:46 <\/div> The classpath on JBoss AS7 (and EAP 6) can be scanned by using the pluggable ClassPathReader facility <\/div> <div class="bugdetail-foot" style="clear:both;"> <p>Ebean already has a facility where you can use your own classpath reader.<\/p><p>Here's how:<br/>1) Create an implementation of com.avaje.ebeaninternal.server.util.ClassPathReader<br/>2) Set the value of the property ebean.classpathreader to the fully qualified name of your implementation.<\/p><p>The implementation uses something along these lines: <a href="https://community.jboss.org/thread/170388">https://community.jboss.org/thread/170388<\/a> to get the classpaths.<\/p> <\/div> <p><\/p> <div class="bugdetail-head"> <div style="float:right"> Rob 30 Jul 08:35 <\/div> Agreed to close <\/div> <div class="bugdetail-foot" style="clear:both;"> <p>We can close this using the interface com.avaje.ebeaninternal.server.util.ClassPathReader<\/p> <\/div> <p><\/p> <input type="hidden" name="f_bugid" value="407"> <\/div> <div id="bugDetailForm" style="display:none;"> <div id="app.comp.BugDetailAddComp"> <h4>Add detail to this bug<\/h4> <table> <tr> <td class="label" style="width:8em;"><span class="mandatory">*<\/span>Summary:<\/td> <td><input class="txt wide90" type="text" id="f_title" name="f_title" value=""><\/td> <\/tr> <tr> <td class="label" valign="top"><span class="mandatory">*<\/span>Details:<\/td> <td><textarea class="wide90" name="f_body" rows="10" cols="30"><\/textarea><\/td> <\/tr> <tr> <td class="label"><\/td> <td>   <\/td> <\/tr> <\/table> <div class="buttons"> <input type="button" class="btn" value="Save" accesskey="s" onclick="woPost('app.comp.BugDetailAddComp','doPost');" > <input type="button" class="btn" value="Cancel" accesskey="c" onclick="j('#bugDetailForm').hide();"> <\/div> <\/div> <\/div> <\/div> <\/div> <\/div><!-- end of bodywrap --> <div id="footwrap"> <div id="footmax"> <div id="foot"> <a href="/">home<\/a> | <a href="#top">back to top<\/a> <\/div> <\/div> <\/div><!-- end of footwrap --> <!-- layers --> <div id="m1popxxx" class="popmenuchild"> <a href="/ebean/introduction.html">Introduction<\/a> <a href="/doc/ebean-userguide.pdf">User Guide (pdf)<\/a> <a href="/configure.html">Install/Configure<\/a> <a href="/static/javadoc/pub/index.html">Public JavaDoc<\/a> <a href="/whitepaper.html">Whitepapers<\/a> <\/div> <div id="m2pop" class="popmenuchild"> <a href="/forumdetail-1.html">General<\/a> <a href="/forumdetail-2.html">Database Specific<\/a> <a href="/forumdetail-3.html">Byte Code<\/a> <a href="/forumdetail-4.html">Deployment Annotations<\/a> <a href="/forumdetail-5.html">Features<\/a> <\/div> <div id="m3pop" class="popmenuchild"> <a href="/bug.html">Top Bugs<\/a> <a href="/enh.html">Top Enhancements<\/a> <\/div> <div id="woResponse">woResponse<\/div> <\/form> <div id="attachmentUpload" class="popdialog"> <form action='/bugdetail-407.html' method="post" id="UPLOAD" enctype="multipart/form-data"> <input type="hidden" name="f_bugid" value="407"> <input type="hidden" name="WO_HANDLER" value="app.comp.BugAttachmentUploadHandler"> <h4>Upload a file<\/h4> <p><input type='file' name='f_file' ><\/p> <div class="buttons"> <input type='submit' name='_upload' value="Upload" > <input type='button' value='Cancel' onclick="popdialog.hide();"> <\/div> <\/form> <\/div> <div id="woFocusDelay"><\/div> <\/body> <\/html>