Commit Graph

41 Commits

Author SHA1 Message Date
Robert von Burg beccdbf4be [Minor] closing potentially open streams 2016-02-10 17:52:17 +01:00
Robert von Burg 465d949071 [Minor] removed unnecessary cast 2016-02-10 17:48:55 +01:00
Robert von Burg cbee61577f [Minor] Caught NPE on shutdown of PostgreSqlPersistenceHandler 2015-11-20 15:20:00 +01:00
Robert von Burg 69eb5ccf38 [Major] Refactored query API
- Now added ordering
- added setters for visitors on query
-
2015-08-10 22:21:45 +02:00
Robert von Burg 29a88fe6ab [New] Added StrolchComponent.getConfiguration()
- and thus removed any instance variables to it in subclasses
2015-07-10 10:48:17 +02:00
Robert von Burg 203013c93d [New] Added migration scripts for Activities as version 0.4.0 2015-07-08 07:51:02 +02:00
Robert von Burg e2ac84ecdc [New][Devel] Work in progress of implementing ActivityMap
- Implemented PostgreSQL persistence

Still missing is the xml persistence implementation and fixing
the tests. Currently no tests were run, just trying to fix compile
errors
2015-06-29 08:34:14 +02:00
Robert von Burg 3a197d6629 [Minor] no need to catch init exception in PostgreSqlPersistenceHandler 2015-06-11 19:19:52 +02:00
Robert von Burg 521bd84ce0 [Major] StrolchComponent methods can now throw Exception
- execption handling is done in the ComponentContainerStateHandler
- clients now not need to worry about exceptions which would make them
  rethrow anyhow as a runtime exception
2015-06-11 19:19:52 +02:00
Robert von Burg 503bdbe4d6 [Major] refactored SystemUserActions in privilege
Now a SystemUserAction is defined as follows:
<Privilege name="ch.eitchnet.privilege.handler.SystemUserAction" 
    policy="DefaultPrivilege">
  <Allow>li.strolch.agent.impl.StartRealms</Allow>
</Privilege>
2015-06-03 23:32:23 +02:00
Robert von Burg f07b241ddc [New] Added feature to ignore a realm on DB init
This can be very handy to not start the connection pool for realms which
you know won't connect to the DB (but is not transient) - weird isn't
it? =))

The property is: db.ignore.realm.<realmName>

The actual use case is the following:
- You have a realm which use is used normally and is not transient so
you have a configuration for it
- you have another StrolchComponent which opens its own transactions to
the DB but you only require a subset of the realms so you then use the
ignore property to ignore the other realms.
2015-05-08 18:07:30 +02:00
Robert von Burg 1da65c1131 [Minor] added logging of pool size in PostgreSqlDbConnectionBuilder 2015-05-08 17:41:36 +02:00
Robert von Burg d3dad2a827 [New] added Integer, Float and ListParameters
- including tests, etc.
2015-05-02 13:32:30 +02:00
Robert von Burg 01535fb515 [New] added connection pool properties for PersistenceHandler
- e.g. for PostgreSQL enforce pool size:
  <db.pool.maximumPoolSize>1</db.pool.maximumPoolSize>
2015-04-30 08:46:18 +02:00
Robert von Burg 47881df2ee [Bugfix] shutdown the connection pool on agent destroy 2015-04-21 16:47:04 +02:00
Robert von Burg 31493f2fa1 [Major] PostgreSql now uses HikariCP for connection pooling 2015-04-21 15:04:51 +02:00
Robert von Burg 0fe7778af5 [Minor] also log exception when fail to parse element from DB XML 2015-04-19 16:38:25 +02:00
Robert von Burg 6bd1ed58ad [New] Added limit and sorting to Audit query incl. REST API 2015-04-04 18:29:33 +02:00
Robert von Burg aa11f8098a [New] Added elementSubType to Audit 2015-04-04 17:53:54 +02:00
Robert von Burg e163237613 [Minor] fixed broken tests 2015-04-03 13:37:56 +02:00
Robert von Burg 819ae53708 [Minor] added missing PrivilegePolicies:
<Policy name="RoleAccessPrivilege"
    class="ch.eitchnet.privilege.policy.RoleAccessPrivilege" />
<Policy name="UserAccessPrivilege" 
    class="ch.eitchnet.privilege.policy.UserAccessPrivilege" />
2015-03-12 18:05:46 +01:00
Robert von Burg 5ffc03f115 [Minor] removed reference to non existing role PrivilegAdmin in users 2015-03-12 18:01:02 +01:00
Robert von Burg 5675027f6c [Minor] removed the PrivilegeAdmin role from all PrivilegeModel.xml 2015-03-12 17:43:42 +01:00
Robert von Burg 5602f56c15 [Major] allow user to change their own locale incl. auto persist 2015-03-08 21:44:35 +01:00
Robert von Burg a832b2dc3e [New] Refactored XML import and export model
- added allowInclude for recursive parsing of xml importing
- ModelStatistics is now JAXB capable
- added handling of absolute paths
2015-02-28 20:41:52 +01:00
Robert von Burg 6ae389bc75 [Minor] added further test in QueryTest for param 2015-02-14 23:04:12 +01:00
Robert von Burg 3fc4c83a61 [Minor] removed all tx.commitOnClose() for read only TXs 2015-02-06 22:13:48 +01:00
Robert von Burg 40c9ac7969 [Major] added new feature tx.flush()
- Now if you need to perform commands to carry on in your transaction,
you can simply use the tx.flush()-method.
- Should something go wrong, then even after a tx.flush() one can call
throw tx.fail("Reason") or tx.rollbackOnClose()
2015-02-06 09:18:12 +01:00
Robert von Burg b0cf516dab [Major] Refactored how a TX is closed
- So sadly just auto closing a TX using try-resource from Java7 is a bad idea.
- Doing that leads to problems when an exception is thrown, then the close is called (duh) but this leads to commit being called.
- Since the Java language does not offer a decent way to detect if the close is being called in the context of an exception i was forced to add a tx.commitOnClose() and tx.rollbackOnClose().
- The default is that when a TX is opened, then the close strategy is rollback; the API user must call tx.commitOnClose() before the TX is closed by the braces, or as late as possible, to make sure that if an exception is thrown the transaction is rolled back, and not committed.
- The API was also extended with a tx.fail(msg):StrolchTransactionException so that if the implementor detects an unrecoverable error, one can write: throw tx.fail(“my reason”);

This was sadly an unavoidable late 1.0.0 change
2015-02-03 23:18:31 +01:00
Robert von Burg 2f84091f76 [Devel] adding new feature tx.flush() 2015-01-26 00:50:46 +01:00
Robert von Burg 7d8516952b [Bugfix] fixed missing timestamps from postgresql dates
- fixed broken tests
2015-01-09 13:48:14 +01:00
Robert von Burg e7e7fe978b [Bugfix] fixed missing timestamps from postgresql dates 2015-01-09 13:37:22 +01:00
Robert von Burg 6e265c755b [Major] refactored DbSchemaVersionCheck and added version parsing
- Now we can use Version to see if current version is greater than
- Fixed bug where version checking didn't check for app
- TODO is still open to handle migration with intermediary steps
2015-01-09 12:34:05 +01:00
Robert von Burg d1a1b89194 [Bugfix] fixed PostgreSqlQueryVisitor due to querying orders in resource
This only happened when the query had a ParameterSelection
2014-12-03 18:12:41 +01:00
Robert von Burg cb5839d37a [Minor] allow dataInitialization if schemaDrop is disabled 2014-11-14 15:05:16 +01:00
Robert von Burg 3bb04c245f [Major] updated expected db_version to 0.2.1 2014-11-14 13:38:19 +01:00
Robert von Burg 85d1a4a145 [Major] refactored PostgreSQL DB schema validation
Now moved all generic schema generation code to ch.eitchnet.utils so it can be used by other projects
2014-11-14 00:07:53 +01:00
Robert von Burg d55371e9b7 [Minor] fixed component version descriptions 2014-10-04 14:35:01 +02:00
Robert von Burg d7c6025c59 [New] Added a new parameter: DurationParameter of type "Duration"
The parameter is implemented in all visitors and also persistence layer
postgre.
2014-10-04 13:40:52 +02:00
Robert von Burg 96740a571c [Major] Added a DB initialization mechanism
Now PostgreSQL implementation can import a configured dataStore if the persistence handler configuration property ‘allowDataInitOnSchemaCreate’. For this to work, the schema must have a migration status of CREATED, or DROPPED_CREATED on startup, or using the new method PersistenceHandler.performDbInitialization()-method. Further the properties ‘allowSchemaDrop’ and ‘allowSchemaCreate’ must be enabled.
2014-09-23 23:57:11 +02:00
Robert von Burg d101fa84fb moved everything to a subdirectory for repo merge 2014-09-16 08:52:23 +02:00