Re: Problems Accessing a Remote Session Bean.
"Marco Mistroni" <[email protected]> Wed, 18 Oct 2006 10:12:42 +0100
| Newsgroups | gmane.comp.java.xdoclet.user |
|---|---|
| Message-ID | <[email protected]> |
Hello , if i understand correctly, you want to access bean from application B, which is supposed to be in a different jar.. is that correct? then try tag below * @ejb.ejb-external-ref * ejb-name="Contact" * view-type="local" * ref-name="ejb/ContactLocalHome" * type="Entity" * home="com.mm.ContactLocalHome" * business="com.mm.ContactLocal" * * @jboss.ejb-local-ref * ref-name="ContactLocalHome" * jndi-name="commons/ejb/partners/contact/ContactLocalHome" HTH marco On 10/18/06, Anthony Roy <[email protected]> wrote: > > Hello all, > > > > I have two J2EE applications, say A and B. A exposes a SessionBean using > both remote and local interfaces – the XDoclet that does this follows: > > > > /** @ejb.bean name="NmrDetails" display-name="NmrDetails" > description="Access to > > * NmrDetails" local-jndi-name="common/NmrDetailsLocal" > > * jndi-name="common/NmrDetails" > > * type="Stateless" view-type="both" > > */ > > public abstract class NmrDetailsBean implements SessionBean {…} > > > > > > This works fine. I can access the bean from within application A using > either remote or local lookup (I have tested this both ways). > > > > Now I want to access the ejb from application B. Now I am not really sure > where and what the XDoclet should be to get the JNDI populated correctly. I > have tried the following on one of the session beans in app B: > > > > /** @ejb.ejb-external-ref type = "Session" > > * jndi-name = "common/NmrDetails" > > * home="uk.co.hpi.common.nmr.ejb.NmrDetailsHome" > > * business="uk.co.hpi.common.nmr.ejb.NmrDetails" > > * view-type=remote" > > */ > > > > But this seems to produce no output (nothing gets added to the ejb-jar.xmlor any of the app server specific config files). Note that there are other > XDoclet annotations on that particular ejb which **are** processed, so > it's not a simple case of the file not having xdoclet run on it. The target > in my build.xml is as follows: > > > > <target name="ejb-xdoclet"> > > <ejbdoclet destdir="${ejb.src.dir}" mergedir="${web.dir}/merge" > excludedtags="@version,@author,@todo" ejbspec="2.0" verbose="false"> > > <fileset dir="${src.dir}" defaultexcludes="yes"> > > <patternset refid="ejb.jar.xdoclet.components" /> > > </fileset> > > <utilobject /> > > <session /> > > <remoteinterface /> > > <homeinterface /> > > <localinterface /> > > <localhomeinterface /> > > <deploymentdescriptor destdir="${dd.dir}" validatexml="false" > useIds="true" displayname="${app.display.name}" description="${ > app.description} ejb modules" /> > > <jboss version="3.0" destdir="${dd.dir}" > unauthenticatedPrincipal="nobody" xmlencoding="UTF-8" validatexml="false" > datasource="PLEASE_MODIFY_THIS" datasourcemapping="PLEASE_MODIFY_THIS" > preferredrelationmapping="PLEASE_MODIFY_THIS" /> > > <webSphere destdir="${dd.dir}" useIds="true" /> > > </ejbdoclet> > > </target> > > > > Am I missing some directive that denotes that ejb-external-ref's should be > processed? Am I using the wrong xdoclet, or the right xdoclet in the wrong > place (or simply the wrong both!)? Anyway, I've been banging my head against > a wall for a couple of days now - does anyone have any thoughts. > > > > Cheers, > > > > Anthony Roy. > > > > This email and any files transmitted with it are confidential and are > intended solely for the use of the individual or entity to whom they are > addressed. This communication represents the originator's personal views and > opinions, which do not necessarily reflect those of HPI Limited. If you are > not the original recipient or the person responsible for delivering the > email to the intended recipient, be advised that you have received this > email in error, and that any use, dissemination, forwarding, printing, or > copying of this email is strictly prohibited. If you received this email in > error, please immediately notify [email protected]. > > > > This message has been scanned by Anti-Virus. Recipients are advised to > apply their own virus checks to this message on delivery. > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > xdoclet-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/xdoclet-user > > > ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ xdoclet-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/xdoclet-user