Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
portal2poe portal2poe
Ext, build-ejb, portal-ejb question
18 de agosto de 2004 10:52
Respuesta

portal2poe portal2poe

Ranking: Junior Member

Mensajes: 56

Fecha de incorporación: 17 de agosto de 2004

Mensajes recientes

Hiya everyone,<br /><br />Forums look great Brian&#33;<br /><br />Using eclipse (which is great&#33;&#33;&#33;) I&#39;m working with build-ejb in the extension environment, and am working on building a portlet with similar functionality to the <br />&quot;projects&quot; portlet. I need to do a join with the User_ table, so looking around in portal-ejb, found a couple examples (Project, Addressbook, BibleJournal)<br /><br />Looking at the ejb.xml in portal-ejb/projects, you&#39;ll notice the following line (circa 66-68):<br /><br />&#60;&#33;-- Relationships --&#62;<br /><br /> &lt;column name=&quot;users&quot; type=&quot;Collection&quot; ejb=&quot;com.liferay.portal.User&quot; mapping-table=&quot;Users_ProjProjects&quot; /&gt;<br /><br /><br />This produces all the EJB code, and creates a JOIN in the Persistence file associated with this EJB. <br /><br />When I move this same line of code to ejb.xml in the extension environment, I get this error:<br /><br /> java.io.FileNotFoundException: C:&#092;Eclipse&#092;workspace&#092;portal&#092;ext&#092;ext-ejb&#092;src&#092;com&#092;liferay&#092;portal&#092;ejb.xml (The system cannot find the path specified)<br /> <br />So my question: Can I make a copy of portal-ejb/src/com/liferay/portal/ejb.xml and plop (plop being a technical term <!--emo&emoticon--><img src='@theme_images_path@/emotions/tongue.gif' border='0' style='vertical-align:middle' alt='tongue.gif' /><!--endemo--> ) it into ext-ejb/src/com/liferay/portal/ ??, or will this cause unintended problems? And if I can&#39;t do it that way, what&#39;s a recommended fix?
Brian Chan
Ext, build-ejb, portal-ejb question
18 de agosto de 2004 11:24
Respuesta

Brian Chan

LIFERAY STAFF

Ranking: Liferay Master

Mensajes: 751

Fecha de incorporación: 4 de agosto de 2004

Mensajes recientes

Hmm.. yes, you understand what&#39;s happening. I&#39;d go ahead and try putting the ejb.xml there. It shouldn&#39;t cause too many problems. The ext way was never tested with many to many relationships with the User ejb.xml.<br /><br />I&#39;d love to know what happens&#33;
portal2poe portal2poe
Ext, build-ejb, portal-ejb question
18 de agosto de 2004 12:16
Respuesta

portal2poe portal2poe

Ranking: Junior Member

Mensajes: 56

Fecha de incorporación: 17 de agosto de 2004

Mensajes recientes

I just realized I was doing something dumb, so I&#39;m recanting what was just here. Hold on while I check it.
Brian Chan
Ext, build-ejb, portal-ejb question
18 de agosto de 2004 12:26
Respuesta

Brian Chan

LIFERAY STAFF

Ranking: Liferay Master

Mensajes: 751

Fecha de incorporación: 4 de agosto de 2004

Mensajes recientes

If you use the build.xml from ext-ejb, it should have a reference to portal-ejb.jar. So it&#39;s the Eclipse environment that doesn&#39;t have access to it. I&#39;m not sure how you&#39;d set that up though (since I only use EditPlus).
portal2poe portal2poe
Ext, build-ejb, portal-ejb question
18 de agosto de 2004 13:10
Respuesta

portal2poe portal2poe

Ranking: Junior Member

Mensajes: 56

Fecha de incorporación: 17 de agosto de 2004

Mensajes recientes

You&#39;re too fast&#33;&#33;&#33; lol.<br /><br />You&#39;re right...in response to the post you read before I nerfed it, eclipse does have access to portal-ejb. But I didn&#39;t include this in my ejb.xml:<br /><br />&lt;reference package-path=&quot;com.liferay.portal&quot; ejb=&quot;User&quot; /&gt;<br /><br /><br />so when I tried to deply, the compiler couldn&#39;t find com.liferay.portal because it wasn&#39;t imported (so once I fixed that, everything compiled beautifully)&#33; <br /><br />So I think, generally, you are able to do a join of a Hibernate HBMl from the ext environment into a HBM in the portal-ejb, it just takes a llittle finangling.