aboutsummaryrefslogtreecommitdiff
path: root/extensions/persist
AgeCommit message (Collapse)Author
2014-10-07Introduce a test that shows a JPA provider being passed a datasourceNigel Magnay
from guice in a map, rather than from the persistence.xml file. Note that this requires a modern version of hibernate since older versions did not correctly process passed objects. Signed-off-by: Nigel Magnay <nigel.magnay@gmail.com>
2014-10-07Update tests to use JPA 2.0.Nigel Magnay
Stopping the persistence service now causes a 'service not registered' exception, hence catch that as it is not an error. Signed-off-by: Nigel Magnay <nigel.magnay@gmail.com>
2014-10-07Allow JPA properties to be Objects as well as simple strings.Nigel Magnay
JpaPersistService takes a parameter thus: Properties persistenceProperties However, this is used later to create an entity manager: Persistence.createEntityManagerFactory(persistenceUnitName, persistenceProperties); The signature for that method is (String, Map) NOT (String, Properties). If one is using Hibernate, you can pass the desired DataSource object in using that Map with Environment.DATASOURCE storing the actual object. Clearly you cannot do that if it's Properties (String->String map) Changing this so that the persistenceProperties is a Map would solves this, so you may now do (for example) DataSource ds = ...; Map p = new HashMap(); p.put( Environment.DATASOURCE, ds ); JpaPersistModule jpaPersistModule = new JpaPersistModule("myapp-db") .properties(p); Since all Properties objects *are* Map instances, this is a non-breaking change. Signed-off-by: Nigel Magnay <nigel.magnay@gmail.com>
2014-07-18Fix issue 597 -- Adds copyright header.Fridolin Jackstadt
2014-07-18Fix issue 597 -- JUnit 3 styleFridolin Jackstadt
2014-07-16Fix issue 597 -- entity manager is properly removed even if close operation ↵Fridolin Jackstadt
fails + unit test.
2014-07-10Update references in code & configuration to point to github instead ofSam Berlin
googlecode. ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=70898906
2014-07-01Automated code cleanups by internal tool.Sam Berlin
------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=69390543
2014-03-20Update the opensource jars to asm 5.0, fix up the POMs & ant scripts.Sam Berlin
------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=63496902
2014-03-10This change removes final from fields annotated with @Inject. In addition ↵Sam Berlin
to being discouraged due to weak semantics [1], it is incompatible with the standard javax.inject.Inject annotation [2]. Refactoring: https://code.google.com/p/error-prone/wiki/GuiceInjectOnFinalField [1] https://code.google.com/p/google-guice/wiki/Injections#Field_Injection [2] https://code.google.com/p/google-guice/wiki/JSR330 ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=62760764
2014-02-13Add ignores for ant build spam.Christian Edward Gruber
2014-02-13Replace guava 11 with 16 and extract Guava as a separate dependency.Christian Edward Gruber
Also, tidy up a teensy bit of test infrastructure, make sure OSGI test is excluded since it's designed for ant-only, and make maven tests fork, as they run out of permgen consistently. Lastly, make the build system enforce a 1.6 minimum, not a 1.5 minimum.
2013-07-31Restore versions to 4.0-SNAPSHOTChristian Edward Gruber
2013-07-29Bump version numbers to release 4.0-beta.Christian Edward Gruber
2013-06-26Clean up some formatting (includes some format artifacts from internal ↵Christian Edward Gruber
changes), and remove executable bit from several files which do not need them.
2013-05-15Upgrade to cglib 3.0 adn ASM 4.0.Christian Edward Gruber
------------------ Manually synced. COMMIT=35272017
2012-08-31Actually pom versions should really be 3.1.0 to reflect the addition of a ↵Stuart McCulloch
couple of new features (ProvisionListener SPI)
2012-08-31Bump pom versions towards next maintenance releaseStuart McCulloch
2011-10-17fix issue 623, move log4j.properties for persist extension out of src and intoguice.mirrorbot@gmail.com
test. Revision created by MOE tool push_codebase. MOE_MIGRATION=3480 git-svn-id: https://google-guice.googlecode.com/svn/trunk@1596 d779f126-a31b-0410-b53b-1d3aecad763e
2011-10-16Fix flaky service test. The whole AsyncService thing probably should just ↵guice.mirrorbot@gmail.com
be rm'd, but fixing the test for now. Revision created by MOE tool push_codebase. MOE_MIGRATION=3475 git-svn-id: https://google-guice.googlecode.com/svn/trunk@1591 d779f126-a31b-0410-b53b-1d3aecad763e
2011-10-16fix issue 623, move log4j.properties for persist extension out of src and ↵sberlin
into test. git-svn-id: https://google-guice.googlecode.com/svn/trunk@1589 d779f126-a31b-0410-b53b-1d3aecad763e
2011-07-08* Remove unused importssberlin
* Sort imports * Convert tabs to spaces * Fix the ant no_aop build Revision created by MOE tool push_codebase. MOE_MIGRATION=2532 git-svn-id: https://google-guice.googlecode.com/svn/trunk@1572 d779f126-a31b-0410-b53b-1d3aecad763e
2011-06-29Restore usernamessberlin
Revision created by MOE tool push_codebase. MOE_MIGRATION=2449 git-svn-id: https://google-guice.googlecode.com/svn/trunk@1569 d779f126-a31b-0410-b53b-1d3aecad763e
2011-06-29Minor whitespace & temporary username changessberlin
Revision created by MOE tool push_codebase. MOE_MIGRATION=2448 git-svn-id: https://google-guice.googlecode.com/svn/trunk@1568 d779f126-a31b-0410-b53b-1d3aecad763e
2011-06-28fixup whitespacesberlin
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1564 d779f126-a31b-0410-b53b-1d3aecad763e
2011-06-28fixup whitespacesberlin
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1563 d779f126-a31b-0410-b53b-1d3aecad763e
2011-06-28fixup whitespacesberlin
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1562 d779f126-a31b-0410-b53b-1d3aecad763e
2011-06-28fixup whitespacesberlin
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1561 d779f126-a31b-0410-b53b-1d3aecad763e
2011-06-28fixup whitespacesberlin
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1560 d779f126-a31b-0410-b53b-1d3aecad763e
2011-06-28fixup whitespacesberlin
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1559 d779f126-a31b-0410-b53b-1d3aecad763e
2011-06-26switch Guice from manually repackaging Guava to depending on Guava. it's ↵sberlin
still jarjar'd right now, which is causing a ~400k increase in guice-snapshot.jar. next step is to switch to ProGuard to remove the unnecessary code and cut it back down (even further?!). this will let people build from Guice source and depend directly on Guava code without having to worry about hiding internal/util. git-svn-id: https://google-guice.googlecode.com/svn/trunk@1558 d779f126-a31b-0410-b53b-1d3aecad763e
2011-02-14issue 595 -- persist extension didn't work if @Transacation was on the ↵sberlin
class, thanks to cgdecker for the patch and bug report! git-svn-id: https://google-guice.googlecode.com/svn/trunk@1493 d779f126-a31b-0410-b53b-1d3aecad763e
2010-12-29Fix for issues 581 and 582dhanji
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1466 d779f126-a31b-0410-b53b-1d3aecad763e
2010-12-13Remove InjectorBuilder in favor of methods in Binder.sberlin
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1457 d779f126-a31b-0410-b53b-1d3aecad763e
2010-12-09fix for NO_AOP build.sberlin
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1445 d779f126-a31b-0410-b53b-1d3aecad763e
2010-11-19change period to semicolon show javadoc shows it in the one-liner for ↵sberlin
package infos. git-svn-id: https://google-guice.googlecode.com/svn/trunk@1379 d779f126-a31b-0410-b53b-1d3aecad763e
2010-11-04Add some comments to the Maven POMsmcculls
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1367 d779f126-a31b-0410-b53b-1d3aecad763e
2010-11-04Update to jarjar-maven-plugin 1.3 release, and use simple logger in persist ↵mcculls
tests git-svn-id: https://google-guice.googlecode.com/svn/trunk@1361 d779f126-a31b-0410-b53b-1d3aecad763e
2010-11-04Update Maven poms to use new jarjar processing rules, allow jarjar and munge ↵mcculls
profiles to be turned off, and synchronize bundle headers in Ant and Maven builds git-svn-id: https://google-guice.googlecode.com/svn/trunk@1360 d779f126-a31b-0410-b53b-1d3aecad763e
2010-10-27move @nullable to internal.utilsberlin
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1323 d779f126-a31b-0410-b53b-1d3aecad763e
2010-10-27issue 16. hide internal things (that can be hidden). need to followup to ↵sberlin
limit visibility on internal things that need to stay pseudo-open and really close the rest. git-svn-id: https://google-guice.googlecode.com/svn/trunk@1322 d779f126-a31b-0410-b53b-1d3aecad763e
2010-10-25update extension package-info.java files to reference 3.0 instead of 2.0, ↵sberlin
also fix issue 563 -- assistedinject package-info referenced the wrong jar name. git-svn-id: https://google-guice.googlecode.com/svn/trunk@1317 d779f126-a31b-0410-b53b-1d3aecad763e
2010-10-21Issue 552: add buildable maven pomsmcculls
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1305 d779f126-a31b-0410-b53b-1d3aecad763e
2010-10-21Current build targets Java5 but String.isEmpty() is Java6 only, so change ↵mcculls
this check to use String.length() instead git-svn-id: https://google-guice.googlecode.com/svn/trunk@1301 d779f126-a31b-0410-b53b-1d3aecad763e
2010-09-18remove non-existent directory from build file, issue 520.sberlin
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1250 d779f126-a31b-0410-b53b-1d3aecad763e
2010-09-16fixed ant build by changing persist build.properties & build.xml to mirror ↵sberlin
other extensions. git-svn-id: https://google-guice.googlecode.com/svn/trunk@1235 d779f126-a31b-0410-b53b-1d3aecad763e
2010-09-12Dynamic finders fixed and test added. Probably want a few more tests and ↵dhanji
early-error checking to be ideal, but otherwise working as advertised. =) git-svn-id: https://google-guice.googlecode.com/svn/trunk@1228 d779f126-a31b-0410-b53b-1d3aecad763e
2010-09-12Final cleanup of Persist Module. Pending a sanity check of the dynamic ↵dhanji
finder API, it is now ready to ship for Guice 3! git-svn-id: https://google-guice.googlecode.com/svn/trunk@1227 d779f126-a31b-0410-b53b-1d3aecad763e
2010-09-11more build configuration fixeslimpbizkit@gmail.com
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1224 d779f126-a31b-0410-b53b-1d3aecad763e
2010-09-11Missing jars for guice-persistdhanji
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1223 d779f126-a31b-0410-b53b-1d3aecad763e