[Installation, Configuration & DEPLOYMENT] - Additional Features for PrefixDeploymentSorter
by bernd.koecke
Hello,
with JBoss 4.0.x we used the class org.jboss.deployment.scanner.PrefixDeploymentSorter to get a deployment order which was idependent of the file content. With JBoss 4.2.x the filename is the first part of the global JNDI-Name. This is a very goog idea, because we have the version number in the filename and with 4.0.x we had to fiddle around with the deployment descriptor to get a version number in the path. No we get it without doing anything. Especially for EJB3 this is very useful. But now the number prefix for the sorter is part of the global JNDI-Name, too. If we had to change the ordering, e.g. add an additonal layer, the JNDI-Name changes, too.
To avoid this I wrote a DirPrefixDeploymentSorter, which sorts according to the prefix in file and directory names. It sorts the whole hierarchy under the directory which was given to the scanner. Are there any interests in the code? Or is there a simplier solution for the problem? Another solution would be to strip the prefix in the deployer, but I think this has a bigger impact on the server code.
Best regards,
Bernd
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4163003#4163003
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4163003
17 years, 9 months
[Installation, Configuration & DEPLOYMENT] - 5.0.0CR1: EJB refs across EARs don't work
by Juergen.Zimmermann
I'm having 2 different EARs and stateless session beans of the 2nd EAR are referencing stateless session beans of the 1st ear. It worked fine with 4.2.2
When migrating to 5.0.0CR1 I got an error message which indicated that I must add "mappedName" to the referenced SLSBs. Now the error is gone, but when deploying the second EAR (with the referencing SLSBs) I get this warning:
WARN [org.jboss.deployment.MappedReferenceMetaDataResolverDeployer] (HDScanner) Unresolved references exist in JBossMetaData:[testHskaEJB.jar#KundenverwaltungTestBean:AnnotatedEJBReferenceMetaData{name=kvProxy,ejb-ref-type=null,link=null,ignore-dependecy=false,mapped/jndi-name=mapped/hska/Kundenverwaltung,resolved-jndi-name=null,beanInterface=interface de.hska.kundenverwaltung.Kundenverwaltung}, testHskaEJB.jar#BestellverwaltungTestBean:AnnotatedEJBReferenceMetaData{name=bvProxy,ejb-ref-type=null,link=null,ignore-dependecy=false,mapped/jndi-name=mapped/hska/Bestellverwaltung,resolved-jndi-name=null,beanInterface=interface de.hska.bestellverwaltung.Bestellverwaltung}]
Code of the referenced SLSB in the 1st EAR:
| @Stateless(mappedName="mapped/hska/Kundenverwaltung")
| public class KundenverwaltungBean implements Kundenverwaltung {
| @SuppressWarnings("unused")
| @PersistenceContext
| private EntityManager em;
|
| @EJB
| private KundenverwaltungDao dao;
|
| @EJB
| @IgnoreDependency
| private Bestellverwaltung bv;
|
| @Resource
| private SessionContext sessionCtx;
Code of the referencing SLSB in the 2nd EAR:
@Stateless
| @Remote(KundenverwaltungTestRemote.class)
| public class KundenverwaltungTestBean implements KundenverwaltungTestRemote {
| @EJB(mappedName="mapped/hska/Kundenverwaltung")
| private Kundenverwaltung kvProxy;
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4162993#4162993
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4162993
17 years, 9 months