@see
https://jira.jboss.org/jira/browse/JBMETA-117
The defining issue is to prohibit an invalid construct:
@Stateless
| @RemoteBinding(jndiBinding="Something")
| @Local(SomeLocalBusinessInterface.class)
| class MyBean implements SomeLocalBusinessInterface{...}
Here I've defined an explicit remote binding on a SLSB w/ no remote view.
Makes sense to put this in the RemoteBindingProcessor:
public void process(JBossSessionBeanMetaData metaData, Class<?> type, RemoteBinding
annotation)
| {
| /*
| * JBMETA-117
| *
| * No @RemoteBindings are allowed if there are no business remote interfaces
| */
|
| BusinessRemotesMetaData businessRemotes = metaData.getBusinessRemotes();
| if (businessRemotes == null || businessRemotes.size() == 0)
| {
| throw new RuntimeException("A @" + RemoteBinding.class.getName() +
" was defined on EJB " + metaData.getName()
| + ", but this bean has no remote business interfaces defined.
[" + ErrorCodes.ERROR_CODE_JBMETA117 + "]");
| }
...but if the @Remote annotation is on the business interface type, not on the
implementation class, this will provide for false errors as the fully merged metadata of
the EJB is not available until after this processor is called.
Is there a mechanism to validate metadata after all the processing/merging is completed?
I'm envisioning something in the form of a chain of validators run by by
JBoss50Creator.create() after everything is merged.
S,
ALR
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4181661#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...