Message Boards

How to deploy a custom portlet with EJB?

Alan Liu, modified 19 Years ago.

How to deploy a custom portlet with EJB?

New Member Posts: 4 Join Date: 8/18/04 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
thumbnail
Brian Kim, modified 19 Years ago.

How to deploy a custom portlet with EJB?

Expert Posts: 311 Join Date: 8/17/04 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
thumbnail
Brian Chan, modified 19 Years ago.

How to deploy a custom portlet with EJB?

Liferay Master Posts: 753 Join Date: 8/5/04 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, modified 19 Years ago.

How to deploy a custom portlet with EJB?

New Member Posts: 4 Join Date: 8/18/04 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
thumbnail
Brian Chan, modified 19 Years ago.

How to deploy a custom portlet with EJB?

Liferay Master Posts: 753 Join Date: 8/5/04 Recent Posts
/portal-ejb<br /><br />has a tools directory in there.<br /><br />ant build-ejb
thumbnail
Brian Kim, modified 19 Years ago.

How to deploy a custom portlet with EJB?

Expert Posts: 311 Join Date: 8/17/04 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;