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.

I think the problem arises because the ClassLoader passed to DefaultClassPathReader.readPath(ClassLoader) is of type ModuleClassLoader (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=f) which does not have a method getClassPath (or getClasspath).

 
Vaughn Butt 29 Jul 22:46
The classpath on JBoss AS7 (and EAP 6) can be scanned by using the pluggable ClassPathReader facility

Ebean already has a facility where you can use your own classpath reader.

Here's how:
1) Create an implementation of com.avaje.ebeaninternal.server.util.ClassPathReader
2) Set the value of the property ebean.classpathreader to the fully qualified name of your implementation.

The implementation uses something along these lines: https://community.jboss.org/thread/170388 to get the classpaths.

Rob 30 Jul 08:35
Agreed to close

We can close this using the interface com.avaje.ebeaninternal.server.util.ClassPathReader

woResponse

Upload a file