no API for managing EntityManagers
by Bill Burke
I've already stated this, but I'll state it again.
If you want to use the JPA store, your application requires specific
knowledge that it is using a JPA store, on multiple levels:
IdentityManagerFactory creation as well as each time you interact with
an IdentityManager. For JPA, you'll want to begin/commit/rollback, and
you also need to close the underlying EntityManager. I don't think JPA
will be alone in wanting to do this. There may be other stores that
could be transactionally aware i.e. Infinispan, etc.
The ContextInitializer is inadequate because it only handles
initialization and none of the other callbacks I mentioned
(begin/commit/rollback/close/destroy).
Also, I strongly believe you need to expose an abstract "transaction"
interface for the IDM. I suggest the following:
interface IdentityContextFactory {
IdentityContext createIdentityContext();
void close();
}
interface IdentityContext {
void begin();
void commit();
void rollback();
void close();
Realm getRealm(String id);
void deleteRealm(Realm realm);
Realm createRealm(String id);
Tier getTier(String id);
void deleteTier(Tier tier);
Tier createTier(String id);
PartitionManager createPartitionManager(Partition partition);
PartitionManager defaultPartitionManager();
}
interface PartitionManager extends IdentityManager { // really I want to
rename IdentityManager
}
interface ContextInitializer {
void begin(SecurityContext context);
void commit(SecurityContext context);
void rollback(SecurityContext context);
void close(SecurityContext context);
void initContextForStore(SecurityContext context, IdentityStore<?>
store);
}
I'd be happy to implement this so long as I can get any pull request I
create committed sooner than the 25 days my current pull request is
sitting in the queue.
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
11 years, 5 months
Refactoring of picketlink-integration-tests
by Ondra Lukas
Hi,
we would like to do some refactoring of PicketLink integration testsuite for easier QE testing with new versions of EAP. We have some ideas how to improve it and I want to ask you what do you think about that. Here is the list, we would like to:
1) change of configuration which running specified tests for specified container. It is currently set by @TargetContainers annotation. We prefer to using better usage of maven profiles and for instance Java subpackages according to profiles. Every subpackage will contain tests which will run only in that profile (for example org.picketlink.test.trust.tests.eap6 will contain tests for EAP6 profile). Tests which run in every profile will stay in current packages. Tests which run in more profiles (but not in all of them) will be added by include/exclude parameters of maven-failsafe-plugin.
Why?
It will be easier to configurate it for QE testing. We need some easy way how to see each test of some profile. Currently we have all tests together and it's quite uncomfortable. It will be simpler to add a new container too.
2) avoid use of Ant and try to rewrite it to maven (using Maven Resource Plugin etc.).
Why?
We want to have ability of setting properties from command line (which is not handled correctly by maven-antrun-plugin). Also we want to have only one type of configuration files.
3) create Arquillian's ServerSetupTasks for setting containters (setting security domains for testing etc.).
Why?
We want to avoid XSLT because it is sometimes out of work in diffrent type of JDKs.
4) remove "dist" folders from every container (/integration-tests/CONTAINER/dist) and remove distributions from dist. We will use only one dist folder which will be located in integration-tests folder.
Why?
If anybody is cloning picketlink-integration-tests from git, he have to clone distributions, but it take a lot of unnecessary time. We think that better way is have one empty folder for all distributions. User can input nedded distributions.
What do you think about that? Does anybody have any idea about improvement of picketlink-integration-tests testsuite?
Thanks,
Ondrej Lukas
11 years, 5 months