Forums

Home » Liferay Portal » English » Liferay Legacy

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Alan Liu
How to deploy a custom portlet with EJB?
August 27, 2004 3:16 AM
Answer

Alan Liu

Rank: New Member

Posts: 4

Join Date: August 17, 2004

Recent Posts

Hi,<br /><br />Documentation � Development � Hot Deploy Portlet WARs <br /> (http://www.liferay.com/documentation/development_hot_deploy.jsp)<br /><br />tells us how to deploy custom portlets without EJB.<br /><br />Is there any document guides us to deploy a custom portlet with EJB like Document Library?<br /><br />It seems difficult to isolate a single EJB descriptor from ejb-jar.xml because the complicated relationships among EJBs.<br /><br />Is there an easy way to deploy EJBs?<br /><br />Thank you.<br /><br />Alan
Brian Kim
How to deploy a custom portlet with EJB?
August 27, 2004 8:00 AM
Answer

Brian Kim

LIFERAY STAFF

Rank: Expert

Posts: 319

Join Date: August 16, 2004

Recent Posts

Hopefully I&#39;m understanding your question correctly. <br /><br />If you want to deploy a EJB, try creating an EJB file ending with *ManagerEJB.java. Then from your tools-java directory, type &quot;ant run-ejbgen&quot;. Note that a whole bunch of files will be created in the same directory as your *ManagerEJB.java file. This will create all the stubs for not only accessing your EJB, but will also make edits to the ejb-jar.xml as well. Once the stubs are created, in your ext-ejb directory, type &quot;ant deploy&quot;. This will compile and deploy your ejbs to the appropriate deploy directories, assuming you have the correct application server settings setup via the properties file.<br /><br />hope that helps,<br />-Brian Kim
Brian Chan
How to deploy a custom portlet with EJB?
August 27, 2004 8:23 AM
Answer

Brian Chan

LIFERAY STAFF

Rank: Liferay Master

Posts: 751

Join Date: August 4, 2004

Recent Posts

Yup, bkim is right. If you want to deploy EJBs, go the custom way ext method (not hot deploy).<br /><br />You could still of course deploy EJBs somewhere else (out of scope of portlet discussion) and use your hot deploy portlet to pick it up.
Alan Liu
How to deploy a custom portlet with EJB?
August 29, 2004 7:37 PM
Answer

Alan Liu

Rank: New Member

Posts: 4

Join Date: August 17, 2004

Recent Posts

Thank for bkim and bchan&#39;s responses.<br /><br />But where is tools-java directory? <br />I can&#39;t find target &quot;run-ejbgen&quot; in any build files.<br /><br />Thank you.<br /><br />Alan
Brian Chan
How to deploy a custom portlet with EJB?
August 29, 2004 8:33 PM
Answer

Brian Chan

LIFERAY STAFF

Rank: Liferay Master

Posts: 751

Join Date: August 4, 2004

Recent Posts

/portal-ejb<br /><br />has a tools directory in there.<br /><br />ant build-ejb
Brian Kim
How to deploy a custom portlet with EJB?
August 30, 2004 3:17 PM
Answer

Brian Kim

LIFERAY STAFF

Rank: Expert

Posts: 319

Join Date: August 16, 2004

Recent Posts

It&#39;s generally a good idea to be developing in an &quot;extension&quot; directory as opposed to developing out of liferay&#39;s /portal directory. This can be done by going to /portal, typing &quot;ant clean start&quot;, and then &quot;ant build-ext&quot;. Doing so will build all the extension directories u need to extend liferay&#39;s capabilities. The reason this is a good practice is to simplify upgrading liferay in the future. It essentially keeps &quot;our&quot; code separate from &quot;yours&quot;. <br /><br />As such, you will want to follow my directions: &quot;Then from your tools-java directory, type &#39;ant run-ejbgen&#39;.&quot;