[Design the new POJO MicroContainer] - Re: Field injection
by alesj
"alesj" wrote : "adrian(a)jboss.org" wrote : Write the tests then you'll understand.
| |
| OK, the test is here, but it doesn't behave as I expect it to behave. :-(
|
I thought I had it, but nope. :-(
A different test code, similar wondering:
| public void testFieldAcessFromMain() throws Throwable
| {
| final FieldsClass tester = new FieldsClass();
| final ReflectFieldInfoImpl impl = new ReflectFieldInfoImpl();
|
| // I can't do setAccesible
| Field field = FieldsClass.class.getDeclaredField("privString");
| // let's try accessible
| try
| {
| field.setAccessible(true);
| }
| catch (Throwable t)
| {
| assertInstanceOf(t, AccessControlException.class);
| }
| // ok, setAccessible not set, so set should also fail
| try
| {
| field.set(tester, "foobar");
| }
| catch (Throwable t)
| {
| assertInstanceOf(t, IllegalAccessException.class);
| }
|
| impl.setField(field); // So I'll use this hole
| field = impl.getField(); // This should have an access check
| // why does this work?!?
| field.set(tester, "foobar");
| assertEquals("foobar", tester.getPrivString());
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138010#4138010
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4138010
18 years
[Design the new POJO MicroContainer] - Re: Field injection
by alesj
"adrian(a)jboss.org" wrote : Write the tests then you'll understand.
|
OK, the test is here, but it doesn't behave as I expect it to behave. :-(
| public void testFieldAcess() throws Throwable
| {
| final FieldsClass tester = new FieldsClass();
|
| final ReflectFieldInfoImpl impl = new ReflectFieldInfoImpl();
| SecurityManager sm = suspendSecurity();
| try
| {
| // e.g. I can't do setAccesible - although you can here, with the current disabled security
| Field myField = FieldsClass.class.getDeclaredField("privString");
| impl.setField(myField); // So I'll use this hole
| }
| finally
| {
| resumeSecurity(sm);
| }
|
| Field field = impl.getField(); // This should have an access check
| field.set(tester, "foobar");
| assertEquals("foobar", tester.getPrivString());
|
| Runnable runnable = new Runnable()
| {
| public void run()
| {
| try
| {
| Field fi = impl.getField(); // This should have an access check
| fi.set(tester, "something"); // this should check for caller
| }
| catch (Throwable t)
| {
| throw new RuntimeException(t);
| }
| }
| };
| ErrorHolderThread other = new ErrorHolderThread(runnable);
| other.start();
| other.join();
| // we should get an error here - but we don't :-(
| assertNotNull("Should get access restriction exception.", other.getError());
| RuntimeException re = assertInstanceOf(other.getError(), RuntimeException.class);
| Throwable cause = re.getCause();
| assertNotNull(cause);
| assertInstanceOf(cause, AccessControlException.class, false);
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138002#4138002
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4138002
18 years
[Design of JBoss jBPM] - Re: iCalendar wrapper
by tom.baeyens@jboss.com
"kukeltje" wrote : Signing messages and/or encrypting overcomes this, but is difficult to enforce when responding. That is one of the reasons I think all this belongs outside jBPM.
|
"aapthorp" wrote : Yes, that was what I was referring to. I agree that the channel specific handling is not a jBPM responsibility. However, the mapping to alternative standard forms or a canonical definition of data (i.e. not just java class definitions) for exchange over an ESB etc is something that might be included as helper functions. So client binding can be at the java API level or at the level of services exposed via an ESB etc...
I agree that it is not part of the core business of jBPM. But if we add such capabilities, then our users will be much more productive, and the solution that we offer will be much more attractive. Building in those channels into jBPM doesn't mean that you *must* use them. It only means that developers can save that time when selecting jBPM.
All those addons have to be related to our core business, which is state management. But they can really give the project a big boost, I think. I meet much more shops that have a hard time in getting technology to work, then companies like yours that know what they're doing. For the former type of companies, having such addons out of the box is a big deal (literally:-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4137961#4137961
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4137961
18 years
[Design of JBoss jBPM] - Re: Jbpm pageflow
by globallogic
Thanks for the reply Koen. 'Incomplete' here is implying that we can't add many other pageflow elements. I have developed few things on the following project:
host: anoncvs.forge.jboss.com
rep: /cvsroot/jbpm
Module: jbpm.ide/org.jbpm.ui
I am not very sure that why this project is lying here if it is not used.
And the flaw with this implementation is the absence of extension points mechanism. But it is better than the alpha version in the sense that you can rename transitions
My aim is to develop it into a full fledged UI editor where developer doesn't require xml editing.
Elements and attributes (seam specific) such as view-id, no-conversation-view-id, back, expression, action etc are missing in this alpha implementation. I was working on jbpm.ide/org.jbpm.ui and have changed it to take these features from UI. But the problem is that in the absence of extension points I have made changes to the code base.
pls advise me regarding jbpm.ide/org.jbpm.ui project. What is this exactly? and are we using this anywhere.
Else, I will work out the same implementation in the alpha release version of org.jbpm.gd.pf and will contribute the same.
regards,
ankit kakkar
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4137948#4137948
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4137948
18 years