[Design of EJB 3.0] - Redesign of Pool Configuration
by ALRubinger
Looking over @Pool and @Cache configurations, I'm not happy with the metamodel available and the implementation I'd put in place last year while resolving API leaks.
Starting this Thread to document the discussion so far.
"#ejb3 IRC" wrote : (02:12:20 AM) ALR: Some things are bothering me with @Pool configs.
| (02:12:24 AM) ALR: 1) 1/2 the stuff we don't have tests for
| (02:12:32 AM) ALR: 2) I hate the Pool configuration now.
| (02:13:29 AM) ALR: carlo: I really messed that up when working around the API leaks. I was new, and wasn't thinking of things I should have been. The whole PoolFactoryRegistry thing is an indirection that requires more configuration than necessary.
| (02:13:46 AM) carlo: ALR: :-)
| (02:13:53 AM) ALR: carlo: And there's no mechanism to define properties for each Pool impl. Everything should be an injected MC bean factory.
| (02:14:03 AM) carlo: ALR: We still have to get a good blueprint for Pool annotations
| (02:14:15 AM) ALR: carlo: So now I'm thinking on how to fix it while maintaining backwards-compatibility.
| (02:14:27 AM) ALR: carlo: For AS6 we can get it right. Same for @Cache and @CacheConfig.
| (02:14:55 AM) carlo: ALR: What I really want to have is that @Cache and @CacheConfig are no longer part of ext-api
| (02:15:16 AM) ALR: carlo: Yes, I'd rather the whole thing be ejb3-cache-jboss-beans.xml
| (02:15:19 AM) carlo: ALR: Each cache implementation should have it's own annotations, metadata and deployers.
| (02:15:28 AM) ALR: carlo: And ejb3-pool-jboss-beans.xml
| (02:15:42 AM) ALR: carlo: With some nice annotations/metadata overrides.
| (02:15:45 AM) carlo: ALR: So you won't even get ejb3-pool-jboss-beans.xml
| (02:16:04 AM) ALR: carlo: I like it as a mechanism to configure the factory defaults. :)
| (02:16:04 AM) carlo: ALR: More like: ejb3-default-pool-jboss-beans.xml
| (02:16:10 AM) ALR: carlo: Yes, that.
S,
ALR
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205130#4205130
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4205130
17 years, 2 months
[Design of POJO Server] - Re: Sub-Profiles ProfileService changes
by emuckenhuber
"bstansberry(a)jboss.com" wrote : Re: resurrecting DeploymentPhase, that wouldn't help with my example case of a war in deploy-hasingleton/. The missing dependency in the example is deploy/jbossweb.sar (the web server) *not* deployers/jbossweb.deployer. (One of the things the war deployers do is establish a dependency on the web server.) So, the MC knows to wait to install the war beans until the webserver is available. But validating the "deploy-hasingleton" profile won't give the MC a chance to be patient.
|
| ...
|
| This validation thing is a pain in general; I vaguely recall some discussion with Scott about a similar issue a year or two back. Perhaps we should move away from automatically validating and instead make it part of the SPI? Let the caller decide when they want a validation check and what to validate?
Yes we could let the caller decide if he wants to validate the profile or not, but i'm not really sure
what exactly is failing for you. Maybe because of the mainDeployer.process() which is done after each profile ?
As validating the profile does not validate the deployments. mainDeployer.checkComplete() is only done once after the profiles are activated.
Maybe you want to commit your .profile files? so that i can take a look what exactly is failing ?
But i've renamed the root.profile to embedded.profile ;)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205073#4205073
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4205073
17 years, 2 months
[Design of POJO Server] - Re: Sub-Profiles ProfileService changes
by bstansberry@jboss.com
Re: resurrecting DeploymentPhase, that wouldn't help with my example case of a war in deploy-hasingleton/. The missing dependency in the example is deploy/jbossweb.sar (the web server) *not* deployers/jbossweb.deployer. (One of the things the war deployers do is establish a dependency on the web server.) So, the MC knows to wait to install the war beans until the webserver is available. But validating the "deploy-hasingleton" profile won't give the MC a chance to be patient.
anonymous wrote : I did not really get what you meant with skipping the validation on a re-entrant activateProfile :-/
The reentrant call path looks like this:
ProfileServiceBootstrap.start(Server) --> ProfileService.activateProfile("all") --> HASingletonDeployer bean starts, becomes master --> HASingletonProfileManager.activateProfile() --> ProfileService.activateProfile("deploy-hasingleton")
One call to activateProfile() leads to another nested call.
Below is an example of ignoring the validation in a re-entrant call. (This is based on doctoring AbstractProfileService rev 83388 before you change validate() to limit validation to a single context.)
| private final ThreadLocal<Boolean> reentrantActivate = new ThreadLocal<Boolean>();
|
| public void activateProfile(ProfileKey key) throws Exception
| {
| ...
|
| ProfileContext context = this.registeredProfiles.get(key);
| if(context == null)
| throw new NoSuchProfileException("No such profile: "+ key);
|
| Boolean reentrant = reentrantActivate.get();
| reentrantActivate.set(Boolean.TRUE);
| try
| {
| try
| {
| log.info("Activating profile: " + context.getProfile());
| controller.change(context, ControllerState.INSTALLED);
| }
| catch(Throwable t)
| {
| throw new RuntimeException(t);
| }
|
| // Check if the profile was activated successfully
| if (Boolean.TRUE.equals(reentrant) == false)
| {
| validate();
| }
| }
| finally
| {
| reentrantActivate.set(reentrant);
| }
| }
This validation thing is a pain in general; I vaguely recall some discussion with Scott about a similar issue a year or two back. Perhaps we should move away from automatically validating and instead make it part of the SPI? Let the caller decide when they want a validation check and what to validate?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205054#4205054
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4205054
17 years, 2 months
[Design the new POJO MicroContainer] - Re: Security services deployer for the MC
by anil.saldhana@jboss.com
"david.lloyd(a)jboss.com" wrote : I'm in the process now of adding tags to create injectable keys from key files and keystores. A logical extension of that would be to inject passwords (read from files? maybe as char arrays, maybe as some kind of opaque object (like a CallbackHandler that handles PasswordCallbacks perhaps?)). What kind of security precautions should be taken? The implication here is that if the password "lives" in the microcontainer's managed space, then anyone who has access to that space gets the password. Maybe a special permission that includes the password bean name should be required to access it? What do you guys think? If I introduce special permissions for password access, I would think we'd want to do the same for SecretKey/PrivateKeys as well since they have similar security implications from what I can see.
* Apart from directly injecting passwords from files, another option would be to use Password Based Encryption (password, salt, iteration count).
* Agree on the special permission. I feel that a special permission category (similar to classloader perm) can be created to give a super user type access to the sensitive keys and then individual permissions for the password, privatekey....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205053#4205053
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4205053
17 years, 2 months