Discussions

EJB programming & troubleshooting: Can we use same home, remote interface and bean class?

  1. Hello

    i have a doubt in EJB deployment. Can we use same home, remote interfaces or bean classes in more than one enterbrise bean?

    <session>
    <ejb-name>SessionEJB1</ejb-name>
    <home>core.intf.GeneralSubscriberHome</home>
    <remote>core.intf.GeneralSubscriber</remote>
    <ejb-class>core.GeneralSubscriberSessionEJB</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>

    <session>
    <ejb-name>SessionEJB2</ejb-name>
    <home>core.intf.GeneralSubscriberHome</home>
    <remote>core.intf.Driver</remote>
    <ejb-class>core.DriverEJB</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>

    For example, i am using the home interface in 2 EJBS. Is is possible? (including remote, bean class)

    Please let me know.

    Regards,
    Ranjitha
  2. I'd say that's one of those gray, unspecified areas. I don't remember the details, but overall, I think weblogic used to offer some flexibility in this sense, while websphere didn't. Anyways, I'd say best way to go about this would be to package your bean and deploy it on the app severs you need to support. Shouldn't take you too much and this way you know for sure. And you can tell us about the results too :-)

    Regards,
    Emil

    http://www.thekirschners.com/software/testare/testare.html