[Design the new POJO MicroContainer] - Re: Property replacement
by adrian@jboss.org
"alesj" wrote :
| AbstractTestDelegate delegate = getDelegate();
| delegate.enableSecurity = false;
|
This won't work.
The flag is only considered during test setup
You could perhaps add a couple of methods to AbstractTestCaseWithSetup
that let you temporarily suspend the security manager.
| protected SecurityManager suspendSecurity()
| {
| SecurityManager result = System.getSecurityManager();
| System.setSecurityManager(null);
| return result;
| }
|
| protected void resumeSecurity(SecurityManager securityManager)
| {
| System.setSecurityManager(securityManager);
| }
|
| |
| | You could then do:
| |
| |
| | | SecurityManager sm = suspendSecurity();
| | | try
| | | {
| | | // Do priviledged stuff
| | | }
| | | finally
| | | {
| | | resumeSecurity(sm);
| | | }
| | |
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005362#4005362
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005362
17 years, 7 months
[Design the new POJO MicroContainer] - Re: Property replacement
by alesj
How do I get pass this:
| access denied (java.util.PropertyPermission test.property.value write)
| java.security.AccessControlException: access denied (java.util.PropertyPermission test.property.value write)
| at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
| at java.security.AccessController.checkPermission(AccessController.java:427)
| at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
| at java.lang.System.setProperty(System.java:699)
| at org.jboss.test.kernel.config.test.PropertyTestCase$1.run(PropertyTestCase.java:64)
| at java.security.AccessController.doPrivileged(Native Method)
| at org.jboss.test.kernel.config.test.PropertyTestCase.testPropertyWithPropertyValue(PropertyTestCase.java:60)
| at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
| at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
| at junit.extensions.TestSetup.run(TestSetup.java:23)
|
My code:
public void testPropertyWithPropertyValue() throws Throwable
| {
| // set property to be replaced
| final String CONST = "PropertyReplaceTestCase";
|
| AbstractTestDelegate delegate = getDelegate();
| delegate.enableSecurity = false;
| AccessController.doPrivileged(new PrivilegedAction<Object>()
| {
| public Object run()
| {
| System.setProperty("test.property.value", CONST);
| return null;
| }
| });
|
| // get property
| Object value = instantiateReplacePropertyValue();
| assertNotNull(value);
| assertEquals(String.class, value.getClass());
| assertEquals(CONST, value);
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005348#4005348
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005348
17 years, 7 months
[Design of POJO Server] - Re: DataSource/ServiceXSLDeployer processing issue
by adrian@jboss.org
"bill.burke(a)jboss.com" wrote : anonymous wrote :
| | But what I will say is that components are an implementation detail.
| | The profile service should not be interested in the components directly,
| | it is not going to touch their attachments.
| |
|
| Don't know about this....I had an idea to be able to serialize an EJB Container so that redeployment is super fast.
That's not what I'm talking about.
I'm saying that the users should modify the -ds.xml,
they shouldn't be allowed to modifed the underlying MBean definitions
and expect the modified version to work across releases.
I don't have a problem with advanced features in the profile service
that cache the components (either metadata or resulting objects)
as long as the cache is flushed when a new version of JBoss is released
or some significant global config changes.
In fact, it would be a useful debugging feature in the admin console
to be able to click on an "Advanced" button and see the underlying
MC/JMX configurations generated.
But, I'd imagine the feature you are talking about is incredibly difficult to
implement anyway.
The basics are pretty simple, you could replace the "InstantiateAction"
in the MC/JMX with a "DeserializeAction" but then it has still got to go through
configure/create/start to get up-to-date references and do things
like binding its entry point into jndi.
"No man is and island" and references to things like the
TransactionManager singleton cannot be serialized, they must be
reinjected.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005341#4005341
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005341
17 years, 7 months
[Design of JBoss Portal] - jboss-portlet dtd for 2.6
by julien@jboss.com
I am working on redoing correctly the DTDs for our various deployment descriptors.
For the jboss-portlet.xml there is the very useful header-content that I was able to comment, however although I understand its content I might not be the most qualified person to document it.
| <!--
| Specify content which should be included in the portal aggregated page when the portlet is present
| on that page. This setting only applies when the portlet is used in the local mode.
| -->
| <!ELEMENT header-content (link|script|meta)*>
|
| <!--
| todo
| -->
| <!ELEMENT link>
|
| <!--
| todo
| -->
| <!ATTLIST link href title type media ref CDATA #IMPLIED>
|
| <!--
| todo
| -->
| <!ELEMENT script>
|
| <!--
| todo
| -->
| <!ATTLIST script src type CDATA #IMPLIED>
|
| <!--
| todo
| -->
| <!ELEMENT meta>
|
| <!--
| todo
| -->
| <!ATTLIST meta name content CDATA #REQUIRED>
|
If someone can provide useful comment with examples to put here it would be great.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005338#4005338
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005338
17 years, 7 months