[Design of JBossXB] - Re: JBossXB-2.0.0.CR5
by scott.stark@jboss.org
See the current org.jboss.test.ejb.metadata.test.EjbJar3xUnitTestCase.testServiceRefs in the jbossxb project. A simple ejb-jar.xml with a session/service-ref is failing with:
anonymous wrote :
| Caused by: org.jboss.xb.binding.JBossXBRuntimeException: {http://java.sun.com/xml/ns/javaee}service-ref not found as a child of {http://java.sun.com/xml/ns/javaee}session
| at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:370)
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:402)
| at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
| at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
| at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
| at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
| at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
| at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
| at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
| at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
| at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
| at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:180)
| ... 23 more
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4091969#4091969
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4091969
18 years, 6 months
[Design of EJB 3.0] - When is there an EJBObject?
by wolfc
With the implementation of EJBTHREE-768 we've a clash on the usage of EJBObject. We had functionality that allowed each proxy to be an EJBObject.
So now this test is failing: org.jboss.ejb3.test.stateful.unit.RemoteUnitTestCase.testEJBObject
For terminology purposes I quote the spec:
"EJB 3 3.1" wrote : Terminology note: This speci?cation uses the term remote business interface to refer to the business interface of an EJB 3.0 session bean that supports remote access. The term remote interface is used to refer to the remote component interface of the EJB 2.1 client view. The term local business interface refers to the local business interface of an EJB 3.0 session bean that supports local access. The term local interface is used to refer to the local component interface of the EJB 2.1 client view.
It is important to note that 'remote interface != remote business interface'.
I say what we had is a spec violation (you know me :-)).
"EJB 3 4.3.3" wrote : The getEJBObject method returns the session bean?s remote interface. Only session beans with a remote EJBObject interface can call this method.
"EJB 3 4.6.6" wrote : The [session bean's business] interface must not extend the javax.ejb.EJBObject or javax.ejb.EJBLocalObject interface.
"EJB 3 4.6.7" wrote : The [session bean's remote] interface must extend the javax.ejb.EJBObject interface.
Which leads to the question: for what scenario did we have this functionality?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4091948#4091948
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4091948
18 years, 6 months
[Design of POJO Server] - Re: ManagedProperty serialization issue
by alesj
"alesj" wrote : I guess this should be added (or is this even part of what I was changing with implementing serialization to ClassInfo?), although it looks like an ugly implementation is about to come out of this. :-)
|
I added this to ReflectMethodInfoImpl (+ similar code to other ReflectX classes):
| private void readObject(ObjectInputStream oistream)
| throws IOException, ClassNotFoundException, NoSuchMethodException
| {
| oistream.defaultReadObject();
| int length = parameterTypes != null ? parameterTypes.length : 0;
| Class<?>[] classes = new Class<?>[length];
| for(int j = 0; j < length; j++)
| classes[j] = parameterTypes[j].getType();
| method = ReflectionUtils.findExactMethod(getDeclaringClass().getType(), name, classes);
| }
|
Utils code:
|
| public static Method findMethod(Class clazz, String name, Class<?>... parameterTypes)
| {
| if (clazz == null)
| return null;
|
| try
| {
| return clazz.getDeclaredMethod(name, parameterTypes);
| }
| catch(Exception ignored)
| {
| }
| return findMethod(clazz.getSuperclass(), name, parameterTypes);
| }
|
| public static Method findExactMethod(Class clazz, String name, Class<?>... parameterTypes)
| throws NoSuchMethodException
| {
| Method method = findMethod(clazz, name, parameterTypes);
| if (method == null)
| throw new NoSuchMethodException(clazz + "." + name + " - " + Arrays.asList(parameterTypes));
| return method;
| }
|
Which makes ReflectX classes know their Member instance after deserialization.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4091946#4091946
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4091946
18 years, 6 months