Your bean only has a local interface. AFAIK, it will not be visible
to other bean JARs - even within the same EAR.
--
Danny Yates
-Original Message-
From: Ionel Gardais [mailto:[EMAIL PROTECTED]
Sent: 21 July 2003 13:09
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [JBoss-user] [urgent] CMR relationship between JAR inside an EAR
Hi,
I have a serious problem with CMR relationship inside 2 bean packages
deployed inside the same EAR.
Using Xdoclet-1.3dev and JBoss3.2.1-Tomcat4.1.24.
Here are my questions :
- does CMR works between bean packages inside an EAR ?
- the two beans of my relationship are Person and Project. It's a
unidirectionnal M:N relationship (Project manage the relationship and
Person is not aware of it).
Beans are stored in separate packages. Both packages are loaded inside
the application.xml.
I use a relation-table to manage this relationship.
In my Project bean, I declare this CMR field :
/**
* @ejb.relation
* name="PROJECT-TO-MANAGERS-RELATION"
* role-name="project-ismanagedby-persons"
* target-ejb="PersonEJB"
* target-role-name="persons-manage-project"
* target-multiple="yes"
* @ejb.interface-method
* view-type="local"
* @jboss.relation-mapping
* style="relation-table"
* @jboss.relation-table
* table-name="P2M"
* create-table="true"
* remove-table="false"
* @jboss.relation
* related-pk-field="id"
* fk-column="IdM"
* @jboss.target-relation
* related-pk-field="id"
* fk-column="IdP"
* [EMAIL PROTECTED]
* --aggregate="techadvantage.beans.PersonValue"
* --aggregate-name="Manager"
* --members="techadvantage.beans.PersonLocal"
* --members-name="Manager"
* --relation="external"
* --type="Collection"
*/
public abstract java.util.Collection getManagers();
/**
* @ejb.interface-method
* view-type="local"
*/
public abstract void setManagers(java.util.Collection personnes);
But when I deploy this under JBoss, I get a DeploymentException :
Xdoclet parse it well.13:24:51,708 ERROR [EntityContainer] Starting failed
org.jboss.deployment.DeploymentException: Entity: PersonEJB not found
for: [EMAIL PROTECTED]
at
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData.(
JDBCRelationshipRoleMetaData.java:103)
at
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationMetaData.(JDBCRela
tionMetaData.java:127)
at
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaData.(JDBCA
pplicationMetaData.java:154)
at
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLo
ader.java:52)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCS
toreManager.java:737)
...
I look at the JNDI tree and PersonEJB have been deployed well.
I also tryed to add an @ejb.ejb-external-ref in the Project bean but it
doesn't solve anything.
* @ejb.ejb-external-ref
* view-type="local"
* type="Entity"
* home="techadvantage.beans.PersonLocalHome"
* business="techadvantage.beans.PersonLocal"
* --link="PersonEJB"
* ref-name="ejb/qualite/PersonneLocal"
Why does it fail ? Is there a solution ?
- As you can see, the @ejb.value-object is commented out because else, I
get "file not found in source tree ...". Is it possible to use external
relationship within value-objects ?
I am in a hurry and I can't find out what is going on.
thanks for helping,
ionel
---
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user
_
Notice to recipient:
The information in this internet e-mail and any attachments is confidential
and may be privileged. It is intended solely for the addressee. If you are
not the intended addressee please notify the sender immediately by
telephone. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on it,
is prohibited and may be unlawful.
When addressed to external clients any opinions or advice contained in this
internet e-mail are subject to the terms and conditions expressed in any
applicable governing terms of business or client engagement letter issued by
the pertinent Bank of America group entity.
If this email originates from the U.K. please note that Bank of America,
N.A., London Branch, Banc of America Securities Limited and Banc of America
Futures Incorporated are regulated by the Financial Services Authority.
_
--