Re: How to use the EJB module?
"Florin T.PATRASCU" <[email protected]> Thu, 31 Jul 2003 20:33:20 -0400
| Newsgroups | gmane.comp.java.jpublish.devel |
|---|---|
| Message-ID | <5.2.1.1.2.20030731201726.01e2aa58@POP> |
Hi James,
This simply works:
1. in jpublish.xml
<jpublish>
<name>K2 MPrice site</name>
<module classname="org.jpublish.module.ejb.EJBModule">
<ejb name="mySessionBean">
<ref>java:comp/env/Example</ref> <!-- I am using
Orion -->
<home>com.your_package.yourSessionBeanHomeInterface</home>
</ejb>
</module>
...
</jpublish>
2. expose the session bean to your Page, let's say page1, therefore in
/pages/page1.xml you'll add the following:
..
<page-action name="ejb.exposeSessionBean">
<name>mySessionBean</name>
</page-action>
...
3. Then, /content/page1.html, can use the Session Bean :
... a result from my SessionBean: <b>$!mySessionBean.aMethod()</b>
Should work :)
However you should pay attention to the way you deploy your EJB components.
Let us know if you need additional help.
Regards,
Florin
At 7/31/2003 18:07, you wrote:
>Hello,
>
>I am interested in plugging the EJBModule into the my JPublish setup but I
>haven't found an example of the configuration file. I downloaded the
>module but there is no example of the XML file. How do I configure
>session beans to be automatically available in JPublish actions?
>
>Thanks for any help,
>
>James Richards
>President, GameJUG.org
>
>
>
>-------------------------------------------------------
>This SF.Net email sponsored by: Free pre-built ASP.NET sites including
>Data Reports, E-commerce, Portals, and Forums are available now.
>Download today and enter to win an XBOX or Visual Studio .NET.
>http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
>_______________________________________________
>Jpublish-developer mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/jpublish-developer
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01