Passing a Scanner instance
by Emmanuel Bernard
Anticipating Ales' work on the optimization between HEM and the micro container ( http://opensource.atlassian.com/projects/hibernate/browse/HHH-4191 ),
I've added a way to pass an instance of Scanner to the persistence unit:
- an actual instance (recommended)
- the class name of the instance to use
Use the hibernate.ejb.resource_scanner property name (HibernatePersistence.SCANNER)
In our case, the JPA deployer needs to add the following property
Map<String, Object> properties = new HashMap<String, Object>(1);
properties.put( HibernatePersistence.SCANNER, mcScannerInstance);
persistenceProvider.createContainerEntityManagerFactory(persistenceUnitInfo, properties);
I've also changed part of the Scanner interface from
/**
* return all files in the classpath (ie PU visibility) matching one of these file names
* if filePatterns is empty, return all files
* the use case is really exact file name.
*/
Set<NamedInputStream> getFilesInClasspath(URL jartoScan, Set<String> filePatterns);
to
/**
* Return all files in the classpath (ie PU visibility) matching one of these file names
* if filePatterns is empty, return all files
* the use case is really exact file name.
*
* NOT USED by HEM at the moment. We use exact file search via getResourceAsStream for now.
*/
Set<NamedInputStream> getFilesInClasspath(Set<String> filePatterns);
15 years, 9 months
Modularization of Search
by Hardy Ferentschik
Hi,
I started on the modularization of Search (HSEARCH-468) and would like to
get some feedback.
So far all I've done is to create a parent pom and push the main code into
the hibernate-search module.
The layout is now:
pom.xml (parent)
/hibernate-search (the main code including tests)
/hibernate-search-archetype (simple maven project used to generate a Maven
Search archetype)
This setup does not offer yet much new to the original setup, but at least
we could now create
a new submodule for the infinispan stuff.
What I am trying to figure out now is how much further I should go with
the current setup.
We were talking about splitting out a module for test utilites
(hibernate-search-testing),
but it turns out that some of the testing utility classes depend on util
classes form the
main source tree. We could try to duplicate some of the classes into the
hibernate-search-testing
module (ugly) or we could do what core does and split even the actual
tests out into
maven module - hibernate-search-testsuite. This would leave us with
/hibernate-search
/hibernate-search-testing
/hibernate-search-testsuite
WDYT? Also which classes are we really interested in publishing in
hibernate-search-testing?
To further complicate things we have this two profiles (with-optional-jars
and without-optional-jars)
in hibernate-search. The main reason for this setup is to allow to run
surefire twice, once w/
and once w/o the optional jars. The setup is really complicated and I
would like to get rid of it.
The obvious thing to do would be to have to testsuite problems, but I am
afraid of module 'explosion'
here. Any other suggestions?
--Hardy
15 years, 9 months
HiveRecord introduction(Hibernate + ActiveRecord)
by Min Cha
(I am sorry.This was written on Hibernate user forum. But I did not receive
any advice so I send a mail to here again.)
Hello.
I have written HiveRecord as an conceptual version. The HiveRecord let you
use the ActiveRecord feature in your Hibernate project. In some ways this
project is similar to Generic Data Access Objects and has very small code
pieces because Hibernate does almost all instead.
Unfortunately, I don`t have an experience which applies Hibernate to
production environment. So, I can`t know whether the HiveRecord can be
useful in real Hibernate project or not. If this project is valuable, I
would like to improve this project with developers in community because
there are difficult technical challenges to give user more sophisticated
APIs.
Would someone give me some advice on this? A following link introduces
HiveRecord.
http://code.google.com/p/hiverecord/
--
Min Cha, Dreaming Developer
Projects involved
- Whitetask : http://code.google.com/p/whitetask/
Twitter & Blog
- http://twitter.com/minslovey
- (Eng) http://minslovey.blogspot.com
- (Kor) http://minslovey.tistory.com
15 years, 9 months
publishing testsuite jars for Hibernate Search
by Sanne Grinovero
Hello,
while writing tests for Infinispan I would like to be able to depend
on Hibernate Search's testsuite, as it contains several helpers which
I would use.
This happened me on other projects too, quite always if Lucene is involved.
Would you be ok in publishing the maven artifacts of the testsuite too?
Infinispan is doing that for core, and it's nice to have general
testing utilities available on the test classpath of other modules;
It's probably going to be required anyway wen modularizing Hibernate Search.
I have the local changes ready, just need an ok for commit; it only
implies some additional entries for the configuration of
maven-jar-plugin.
Cheers,
Sanne
15 years, 9 months
Re: [hibernate-dev] release
by Steve Ebersole
Yeah we will need to do a 2.2.23 release of this to move forward with
the hibernate release :(
On 03/11/2010 10:07 AM, Steve Ebersole wrote:
> Hardy asked where the dtds are kept in our source. I was pointing him
> to them.
>
> The change here was just to use the local dtd resolution strategy i
> added in 2.2.2 to this inclusion helper process. I just missed this
> usage when making the addition.
>
> On 03/11/2010 10:00 AM, Strong Liu wrote:
>> No, i don't think so, and also it is not because of that docbook.dtd
>> cant be access.
>> basically, that XIncludeHelper.locateInclusions method will be called
>> many times when you build docs, every time it tries to get that dtd
>> from web.
>> so in Gail's case, it was running but busy on resolve dtd :D
>>
>> and no relates to those ent files, because i have excluded those non
>> xml files from this method
>>
>>
>>
>> On Mar 11, 2010, at 11:55 PM, Steve Ebersole wrote:
>>
>>> You mean like these:
>>> http://fisheye.jboss.org/browse/Maven/plugins/jdocbook/maven-jdocbook-plu...
>>>
>>> ?
>>>
>>> ;)
>>>
>>> On 03/11/2010 09:49 AM, Hardy Ferentschik wrote:
>>>> I remember the days when my Struts application wouldn't start up,
>>>> because on startup it validated the
>>>> xml and always downloaded the dtd via the web. If the website was down,
>>>> the app would not start up.
>>>> I guess something similar happened here.
>>>>
>>>> Using a local resolver seem to be a good idea, but I don't see the dtd
>>>> checked into our sources, so
>>>> I think the only reason it works now again is because
>>>> http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
>>>> is accessible again.
>>>>
>>>> my 0.02$
>>>>
>>>> --Hardy
>>>>
>>>> On Thu, 11 Mar 2010 12:32:55 -0300, Strong Liu<stliu(a)redhat.com> wrote:
>>>>
>>>>> IMO, this is the point, XIncludeHelper.locateInclusions use
>>>>> FileUtil.createSAXSource to create a Source object, after you enabled
>>>>> this loading feature, it will tries to resolve the dtd from remote
>>>>> here is what i changed.
>>>>>
>>>>> http://fisheye.jboss.org/browse/Maven/plugins/jdocbook/maven-jdocbook-plu...
>>>>>
>>>>>
>>>>>
>>>>> 428 442 442 XIncludeHelper.java
>>>>> 37 37
>>>>> 38 38 import org.apache.xerces.jaxp.SAXParserFactoryImpl;
>>>>> 39 39 import org.jboss.jdocbook.JDocBookProcessException;
>>>>> 40 + import
>>>>> org.jboss.jdocbook.xslt.resolve.entity.EntityResolverChain;
>>>>> 41 + import
>>>>> org.jboss.jdocbook.xslt.resolve.entity.LocalDocBookEntityResolver;
>>>>> 40 42 import org.xml.sax.EntityResolver;
>>>>> 41 43 import org.xml.sax.InputSource;
>>>>> 42 44 import org.xml.sax.SAXException;
>>>>>
>>>>> …
>>>>> 72 74 return null;
>>>>> 73 75 }
>>>>> 74 76 };
>>>>> 77 +
>>>>> 78 + EntityResolverChain entityResolverChain = new
>>>>> EntityResolverChain(entityResolver);
>>>>> 79 + entityResolverChain.addEntityResolver(new
>>>>> LocalDocBookEntityResolver());
>>>>> 75 80
>>>>> 76 81 try {
>>>>> 77 82 SAXParserFactory parserFactory = new SAXParserFactoryImpl();
>>>>> 78 83 parserFactory.setXIncludeAware( true );
>>>>> 79 84
>>>>> 80 - Source transformationSource = FileUtils.createSAXSource( root,
>>>>> entityResolver, true, null );
>>>>> 85 + Source transformationSource = FileUtils.createSAXSource( root,
>>>>> entityResolverChain, true, null );
>>>>> 81 86 Result transformationResult = new StreamResult( new
>>>>> NoOpWriter() );
>>>>> 82 87
>>>>> 83 88 javax.xml.transform.TransformerFactory transformerFactory = new
>>>>> com.icl.saxon.TransformerFactoryImpl();
>>>>>
>>>>>
>>>>> On Mar 11, 2010, at 11:26 PM, Steve Ebersole wrote:
>>>>>
>>>>>> That's not true afaik:
>>>>>> reader.setFeature( Constants.DTD_LOADING_FEATURE, true );
>>>>>> reader.setFeature( Constants.DTD_VALIDATION_FEATURE, false );
>>>>>>
>>>>>> Loading *needs* to happen.
>>>>>>
>>>>>> Anyway that code was the same before I updated and after I updated.
>>>>>> This is in FileUtils#createSAXSource. So where is it that you
>>>>>> changed?
>>>>>>
>>>>>> On 03/11/2010 08:49 AM, Strong Liu wrote:
>>>>>>> I have fixed this issue
>>>>>>> https://jira.jboss.org/jira/browse/MPJDOCBOOK-52, and released a
>>>>>>> 2.2.3-SNAPSHOT
>>>>>>>
>>>>>>> i'd think this is because Steve enabled the dtd validation in this
>>>>>>> 2.2.3 release
>>>>>>>
>>>>>>> i will try to build hibernate trunk later (for the sync) with this
>>>>>>> snapshot release
>>>>>>> Steve, would you consider release a 2.2.3?
>>>>>>>
>>>>>>>
>>>>>>> -------------------------------
>>>>>>> Best Regards,
>>>>>>>
>>>>>>> Strong Liu
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Mar 11, 2010, at 12:12 PM, Gail Badner wrote:
>>>>>>>
>>>>>>>> The build seems to hang while building the doc, so this is not
>>>>>>>> going to
>>>>>>>> happen tonight.
>>>>>>>>
>>>>>>>> Here is the build log when it stops:
>>>>>>>>
>>>>>>>> [INFO] Building Hibernate Manual
>>>>>>>> [INFO] task-segment: [clean, test]
>>>>>>>> [INFO]
>>>>>>>> ------------------------------------------------------------------------
>>>>>>>>
>>>>>>>>
>>>>>>>> [INFO] [clean:clean {execution: default-clean}]
>>>>>>>> [INFO] Deleting directory
>>>>>>>> /NotBackedUp/gbadner/hibernate-core/trunk-before-3.5.0-CR-3/documentation/manual/target
>>>>>>>>
>>>>>>>>
>>>>>>>> [INFO] [enforcer:enforce {execution: enforce-java}]
>>>>>>>> [INFO] [jdocbook:resources {execution: default-resources}]
>>>>>>>> [INFO] Expanding:
>>>>>>>> /home/gbadner/NotBackedUp/.m2/repository-trunk/org/jboss/jbossorg-jdocbook-style/1.1.0/jbossorg-jdocbook-style-1.1.0.jdocbook-style
>>>>>>>>
>>>>>>>>
>>>>>>>> into
>>>>>>>> /NotBackedUp/gbadner/hibernate-core/trunk-before-3.5.0-CR-3/documentation/manual/target/docbook/staging
>>>>>>>>
>>>>>>>>
>>>>>>>> [INFO] Expanding:
>>>>>>>> /home/gbadner/NotBackedUp/.m2/repository-trunk/org/jboss/jbossorg-fonts/1.0.0/jbossorg-fonts-1.0.0.jdocbook-style
>>>>>>>>
>>>>>>>>
>>>>>>>> into
>>>>>>>> /NotBackedUp/gbadner/hibernate-core/trunk-before-3.5.0-CR-3/documentation/manual/target/docbook/staging
>>>>>>>>
>>>>>>>>
>>>>>>>> [INFO] Expanding:
>>>>>>>> /home/gbadner/NotBackedUp/.m2/repository-trunk/org/hibernate/hibernate-jdocbook-style/2.0.1/hibernate-jdocbook-style-2.0.1.jdocbook-style
>>>>>>>>
>>>>>>>>
>>>>>>>> into
>>>>>>>> /NotBackedUp/gbadner/hibernate-core/trunk-before-3.5.0-CR-3/documentation/manual/target/docbook/staging
>>>>>>>>
>>>>>>>>
>>>>>>>> [INFO] Expanding:
>>>>>>>> /home/gbadner/NotBackedUp/.m2/repository-trunk/org/jboss/jbossorg-jdocbook-style/1.1.0/jbossorg-jdocbook-style-1.1.0.jdocbook-style
>>>>>>>>
>>>>>>>>
>>>>>>>> into
>>>>>>>> /NotBackedUp/gbadner/hibernate-core/trunk-before-3.5.0-CR-3/documentation/manual/target/docbook/staging
>>>>>>>>
>>>>>>>>
>>>>>>>> [INFO] Expanding:
>>>>>>>> /home/gbadner/NotBackedUp/.m2/repository-trunk/org/jboss/jbossorg-fonts/1.0.0/jbossorg-fonts-1.0.0.jdocbook-style
>>>>>>>>
>>>>>>>>
>>>>>>>> into
>>>>>>>> /NotBackedUp/gbadner/hibernate-core/trunk-before-3.5.0-CR-3/documentation/manual/target/docbook/staging
>>>>>>>>
>>>>>>>>
>>>>>>>> [INFO] [jdocbook:translate {execution: default}]
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Gail Badner wrote:
>>>>>>>>> Just to let you know, I'm making preparations for 3.5.0-CR-3.
>>>>>>>>> -- Gail
>>>>>>>>> Hardy Ferentschik wrote:
>>>>>>>>>
>>>>>>>>>> Well, there are still a few code changes and if you tar up all
>>>>>>>>>> the
>>>>>>>>>> different documentation
>>>>>>>>>> bundles and attach them to a helpdesk request you get them
>>>>>>>>>> uploaded quite
>>>>>>>>>> quickly (and yes
>>>>>>>>>> an automated upload would be nice!)
>>>>>>>>>>
>>>>>>>>>> If the majority of people is for a delay then that's fine with
>>>>>>>>>> me, but I
>>>>>>>>>> just wanted to
>>>>>>>>>> remind how you yourself said how important it is to stick to the
>>>>>>>>>> boxed
>>>>>>>>>> releases.
>>>>>>>>>>
>>>>>>>>>> --Hardy
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Wed, 10 Mar 2010 19:02:46 -0300, Steve
>>>>>>>>>> Ebersole<steve(a)hibernate.org>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> I agree in theory. But here we have very little actual code
>>>>>>>>>>> changes:
>>>>>>>>>>> http://opensource.atlassian.com/projects/hibernate/secure/IssueNavigator....
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> That coupled with the fact the uploading docs is still painful
>>>>>>>>>>> is it
>>>>>>>>>>> worth it?
>>>>>>>>>>>
>>>>>>>>>>> On 03/10/2010 02:33 PM, Hardy Ferentschik wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> Given the discussion we had the other day about boxed
>>>>>>>>>>>> releases, we
>>>>>>>>>>>> should have another CR candidate
>>>>>>>>>>>> in this case.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Wed, 10 Mar 2010 17:27:05 -0300, Steve
>>>>>>>>>>>> Ebersole<steve(a)hibernate.org>
>>>>>>>>>>>> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>> I want to push the release originally scheduled for today to
>>>>>>>>>>>>> next week.
>>>>>>>>>>>>> We are down to docs and website.
>>>>>>>>>>>>>
>>>>>>>>>>>>> There are still a few issues with the docs. After implementing
>>>>>>>>>>>>> the
>>>>>>>>>>>>> monospace fonts for programlistigns I am now noticing that the
>>>>>>>>>>>>> callouts
>>>>>>>>>>>>> are all no longer aligned properly (and actually its been
>>>>>>>>>>>>> suggested
>>>>>>>>>>>>> many
>>>>>>>>>>>>> of these be migrated away from programlisting/programlistingco
>>>>>>>>>>>>> altogether. So I'd like the get that all cleaned up. There is
>>>>>>>>>>>>> also
>>>>>>>>>>>>> still the minor issue of line spacing for programlisting in
>>>>>>>>>>>>> the pdf.
>>>>>>>>>>>>>
>>>>>>>>>>>>> As for the site we are actually pretty close to done with what
>>>>>>>>>>>>> we need
>>>>>>>>>>>>> to do for the new site.
>>>>>>>>>>>>>
>>>>>>>>>>>>> In total the idea to push back to next week is to tie up those
>>>>>>>>>>>>> loose
>>>>>>>>>>>>> ends and deliver them all at once along with the Final.
>>>>>>>>>>>>>
>>>>>>>>>>>>> +/- ?
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> hibernate-dev mailing list
>>>>>>>>>> hibernate-dev(a)lists.jboss.org
>>>>>>>>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> hibernate-dev mailing list
>>>>>>>>> hibernate-dev(a)lists.jboss.org
>>>>>>>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> hibernate-dev mailing list
>>>>>>>> hibernate-dev(a)lists.jboss.org
>>>>>>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> hibernate-dev mailing list
>>>>>>> hibernate-dev(a)lists.jboss.org
>>>>>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>>>>>
>>>>>> --
>>>>>> steve(a)hibernate.org
>>>>>> http://hibernate.org
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> hibernate-dev mailing list
>>>>> hibernate-dev(a)lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>>>
>>>
>>> --
>>> steve(a)hibernate.org
>>> http://hibernate.org
>>
>
--
steve(a)hibernate.org
http://hibernate.org
15 years, 9 months
release
by Steve Ebersole
I want to push the release originally scheduled for today to next week.
We are down to docs and website.
There are still a few issues with the docs. After implementing the
monospace fonts for programlistigns I am now noticing that the callouts
are all no longer aligned properly (and actually its been suggested many
of these be migrated away from programlisting/programlistingco
altogether. So I'd like the get that all cleaned up. There is also
still the minor issue of line spacing for programlisting in the pdf.
As for the site we are actually pretty close to done with what we need
to do for the new site.
In total the idea to push back to next week is to tie up those loose
ends and deliver them all at once along with the Final.
+/- ?
--
steve(a)hibernate.org
http://hibernate.org
15 years, 9 months