[Design of JBoss Transaction Services] - Re: TransactionTimeoutConfiguration pluggability
by adrian@jboss.org
"jhalliday" wrote : I'm tempted to revise the spi spec such that the method throws SystemException if the arg is true and the tx is in anything other than STATUS_ACTIVE. The JIRA mentions STATUS_PREPARING as a valid state, but I'm not so sure.
|
Its perfectly valid for "one resource adapter" or synchronization to invoke another
resource adapter during the before synchronization or prepare
e.g. the hibernate rar (if it was used) delegates work to the jdbc rar.
anonymous wrote :
| Attempting to timeout and rollback a PREPARING tx is a very dodgy proposition.
|
Its no where near as bad during the commit phase. ;-)
anonymous wrote :
| IllegalStateException is probably more appropriate than SystemException, but unchecked. There is also the matter of clarifying the expected time units for the return value.
SystemException is for serious failure isn't it?
IllegalStateException would be preferable if it is not RollBackOnly or RolledBack.
The other bad states (e.g. Commiting/ted) indicate a misuse by the application.
e.g. forking threads and re-enlisting the tx in the new threads but not synchronizing
the commit across that work.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4137831#4137831
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4137831
18 years
[Design the new POJO MicroContainer] - Field access restriction
by alesj
anonymous wrote :
| Also I don't see a test in the kernel project that is validating
| that you can't use the xml deployment (or programmatic deployment)
| to bypass the private field access.
|
| e.g. See the AccessControlTestCase that validates
| that somebody can't use the MC to get access the system properties if they
| don't have the right to do so.
|
Looking at that test, plus trying the 'suck it and see' principle with setting up the FieldAccess test, I fail to get it to fail on access restriction.
My bean looks like this:
| public class AccessBean
| {
| @SuppressWarnings("unused")
| private String priString;
| protected String protString;
| public String pubString;
| }
|
and the test class extends AbstractDeploymentTest which enables security.
| public static AbstractTestDelegate getDelegate(Class<?> clazz) throws Exception
| {
| AbstractTestDelegate delegate = MicrocontainerTest.getDelegate(clazz);
| delegate.enableSecurity = true;
| return delegate;
| }
|
While trying this:
| <bean name="private" class="org.jboss.test.kernel.deployment.support.AccessBean" access-mode="ALL">
| <property name="priString">foobar</property>
| </bean>
|
| <bean name="protected" class="org.jboss.test.kernel.deployment.support.AccessBean" access-mode="ALL">
| <property name="protString">foobar</property>
| </bean>
|
both beans get normally installed.
What am I missing?
Since 'enableSecurity=true' does the trick on PropertyField2DependencyTestCase (where I had to disable it in order to test what I wanted to test).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4137800#4137800
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4137800
18 years