[Design the new POJO MicroContainer] - ClassCastException for char[] MetaValue creation
by scott.stark@jboss.org
This org.jboss.test.metatype.values.factory.test.ArrayValueFactoryUnitTestCase.testCharArray test is failing with the shown CCE. Should simple type arrays be handled by the DefaultMetaValueFactory.createArrayValue?
| public void testCharArray()
| throws Exception
| {
| char[] array = "Hello".toCharArray();
| ArrayMetaType arrayType = assertInstanceOf(resolve(array.getClass()), ArrayMetaType.class);
| MetaValue[] metaArray = { SimpleValueSupport.wrap('H'),
| SimpleValueSupport.wrap('e'),
| SimpleValueSupport.wrap('l'),
| SimpleValueSupport.wrap('l'),
| SimpleValueSupport.wrap('o')
| };
| ArrayValueSupport expected = new ArrayValueSupport(arrayType, metaArray);
|
| MetaValue result = createMetaValue(array);
| ArrayValue actual = assertInstanceOf(result, ArrayValue.class);
| getLog().debug("Array Value: " + actual);
| assertEquals(expected, actual);
| }
|
| java.lang.ClassCastException: [C
| at org.jboss.metatype.plugins.values.DefaultMetaValueFactory.createArrayValue(DefaultMetaValueFactory.java:201)
| at org.jboss.metatype.plugins.values.DefaultMetaValueFactory.internalCreate(DefaultMetaValueFactory.java:411)
| at org.jboss.metatype.plugins.values.DefaultMetaValueFactory.create(DefaultMetaValueFactory.java:344)
| at org.jboss.test.metatype.values.factory.test.AbstractMetaValueFactoryTest.createMetaValue(AbstractMetaValueFactoryTest.java:89)
| at org.jboss.test.metatype.values.factory.test.ArrayValueFactoryUnitTestCase.testCharArray(ArrayValueFactoryUnitTestCase.java:95)
| ...
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071441#4071441
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071441
18 years, 8 months
[Design of JBoss Transaction Services] - Re: Metadata Support for Transactional Web Services
by mark.little@jboss.com
"maciej.machulak" wrote : "maciej.machulak" wrote : Hello,
| |
| | At this moment my code relies on the API provided by XTS. What I thought of is that it might be nice to have some sort of a transaction factory which would provide me with common methods for creating and enlisting participants in Business Activities. It would hide details of the underlying transaction service. I could then encapsulate implementation specific code and make the overall framework easier to extend.
| |
|
| But of course the framework would still rely on XTS. It will be just much easier to replace XTS with some other transaction service - possibly not related to Web Services.
|
Support for compensation transactions is limited. Plus there are a range of different extended transaction models that we can support in JBossTS that other TMs simply can't. I wouldn't worry about making this portable: making it powerful/more flexible with JBossTS is the way to go.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071402#4071402
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071402
18 years, 8 months
[Design of JBoss Transaction Services] - Re: Metadata Support for Transactional Web Services
by mark.little@jboss.com
"maciej.machulak" wrote : Hello,
|
| anonymous wrote :
| | anonymous wrote :
| | | What I would like to achieve at this moment is to slightly restructure the code and decouple it
| | | from the XTS (XML Transaction Service) implementation - by providing some sort of a Transaction
| | | Factory.
| | |
| |
| | I'm not entirely sure what you mean by this.
|
| At this moment my code relies on the API provided by XTS. What I thought of is that it might be nice to have some sort of a transaction factory which would provide me with common methods for creating and enlisting participants in Business Activities. It would hide details of the underlying transaction service. I could then encapsulate implementation specific code and make the overall framework easier to extend.
|
There are no common methods/interfaces. With the exception of JSR 156 none of the compensation transaction work has ever been standardized.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071400#4071400
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071400
18 years, 8 months