using only Remote Interfaces
zapa Feb 15, 2004 12:06 PMHi there ,
I was told in a recent thread that with JBoss I can code without writting Local interfaces as JBoss optimises them automatically in the background
So I started writting only Remote Interfaces for my beans . The first problem I ran into was that , even with no mention of Local interfaces in the jboss.xml or ejb-jar.xml file , as the beans were beeing deployed , Jboss kept on complaining about the entity beans that were used in relations with other beans about not having LocalInterfaces . It's odd that it did not complain about beans with no relation .
Here is an example . I have a CMP entity bean called UserEJB , wich simply holds the user and password for users accessing a system . At first this bean was alone , with no relation to any other bean . Jboss deployed it just fine . I then created another CMP bean LoggedUserEJB that would be in a relation with the UserEJB . Here is the relation in ejb-jar.xml :
<ejb-relation> <ejb-relation-name>LoggedUser-User</ejb-relation-name> <ejb-relationship-role> <ejb-relationship-role-name> LoggedUser-has-one-User </ejb-relationship-role-name> <multiplicity>One</multiplicity> <relationship-role-source> <ejb-name>LoggedUserEJB</ejb-name> </relationship-role-source> <cmr-field> <cmr-field-name>user</cmr-field-name> </cmr-field> </ejb-relationship-role> <ejb-relationship-role> <ejb-relationship-role-name> User-belongs-to-LoggedUser </ejb-relationship-role-name> <multiplicity>One</multiplicity> <relationship-role-source> <ejb-name>UserEJB</ejb-name> </relationship-role-source> </ejb-relationship-role> </ejb-relation>
As I was trying to redeploy the application , JBoss complained about UserEJB not having a LocalHome Interface .
Can anyone come up with any ideeas for my problem ? This was not the only time i've had this problem , every single bean in the application complains at deployment time IF it is declared in a relation with another bean AND it does not have the Local stuff written completly ( even though , i never make any references to the local stuff , i've written it for a few beans just to be able to deploy them )