[Design of EJB 3.0] - Add
by ALRubinger
Placed an ugly line in the other day:
catch(Exception e)
| {
| if(e.getClass().getAnnotation(ApplicationException.class)!=null)
| {
| ...handle AppException
| } else {
| ...handle Exception as normal
| }
This doesn't account for a couple things:
1) XML-defined ApplicationExceptions in ejb-jar.xml assembly-descriptor/application-exceptions
2) Inheritance (is an exception whose parent is @ApplicationException also an Application Exception?)
Would propose adding a List of Application Exceptions to EJBContainer, which I think would entail:
1) An additional method in Ejb3DescriptorHandler, "addApplicationExceptionAnnotations", to be called from addAssemblyAnnotations().
2) Additional scanning for @ApplicationException at deployment time.
Tricky thing here is that Application Exceptions are global per deployment unit (JAR), and would need to be referenced from all EJBs (Containers) in that unit.
Or is the matadata project making some of this moot by merging the annotations and XML together into JBossAssemblyDescriptorMetaData, in which case we can skip the scanning step 2) above?
S,
ALR
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107047#4107047
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107047
18 years, 4 months
[Design of POJO Server] - Deployers tests and EJB errors
by alesj
I'm currently running what is to be MC2_beta7 in current AS5 trunk code to tests its deployers suite.
And I get a bunch of errors, where I really don't see what is for me to handle or what fails due to EJB3/metadata refactoring.
Let me just list some of them. :-)
| Caused by: java.lang.RuntimeException: Error determining structure: testdeployers-ear1.ear
| Caused by: java.lang.RuntimeException: testdeployers-jbas4548-ds.xml module listed in application.xml does not exist within .ear testdeployers-ear1.ear
| at org.jboss.deployment.EARStructure.determineStructure(EARStructure.java:243)
| ... 59 more
| Caused by: java.io.FileNotFoundException: JarHandler@30287876[path= context=file:/C:/projects/jboss5/trunk/testsuite/output/lib/testdeployers-ear1.ear real=file:/C:/projects/jboss5/trunk/testsuite/output/lib/testdeployers-ear1.ear] has no child: testdeployers-jbas4548-ds.xml
|
Getting this multiple times:
| *** DEPLOYMENTS IN ERROR: Name -> Error
|
| vfsfile:/C:/projects/jboss5/trunk/testsuite/output/lib/testdeployers-ear-noappxml.ear -> org.jboss.deployment.DeploymentException: entity class not found: JBAS4548_EntityPK
|
|
| *** CONTEXTS IN ERROR: Name -> Error
|
| vfsfile:/C:/projects/jboss5/trunk/testsuite/output/lib/testdeployers-ear-noappxml.ear -> org.jboss.deployment.DeploymentException: entity class not found: JBAS4548_EntityPK
|
| *** DEPLOYMENTS IN ERROR: Name -> Error
|
| vfsfile:/C:/projects/jboss5/trunk/testsuite/output/lib/testdeployers-jbas2904.ear -> org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfsfile:/C:/projects/jboss5/trunk/testsuite/output/lib/testdeployers-jbas2904.ear
|
|
| *** CONTEXTS IN ERROR: Name -> Error
|
| vfsfile:/C:/projects/jboss5/trunk/testsuite/output/lib/testdeployers-jbas2904.ear -> org.xml.sax.SAXException: cvc-complex-type.2.4.b: The content of element 'application' is not complete. One of '{"http://java.sun.com/xml/ns/j2ee":display-name, "http://java.sun.com/xml/ns/j2ee":icon, "http://java.sun.com/xml/ns/j2ee":module}' is expected. @ *unknown*[11,15]
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107043#4107043
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107043
18 years, 4 months