JBoss Portal SVN: r9798 - modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-02-06 09:10:01 -0500 (Wed, 06 Feb 2008)
New Revision: 9798
Removed:
modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/portal.xml
Log:
remove portal.xml after all, we'll use a jsp taglib
Deleted: modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/portal.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/portal.xml 2008-02-06 07:55:21 UTC (rev 9797)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/portal.xml 2008-02-06 14:10:01 UTC (rev 9798)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<portal>
- <pages>
- <page name="default">
- <column name="center">
- <window>
- <portlet application="google-map-portlet" name="GoogleMap"/>
- </window>
- <window>
- <portlet application="google-weather-portlet" name="GoogleWeather"/>
- </window>
- </column>
- </page>
- </pages>
-</portal>
18 years, 2 months
JBoss Portal SVN: r9797 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-02-06 02:55:21 -0500 (Wed, 06 Feb 2008)
New Revision: 9797
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml
Log:
minor corrections to my revision:
3.6. Disabling Dynamic Proxy Un-wrapping
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml 2008-02-06 07:04:41 UTC (rev 9796)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml 2008-02-06 07:55:21 UTC (rev 9797)
@@ -262,19 +262,23 @@
</sect1>
<sect1>
<title>Disabling Dynamic Proxy Un-wrapping</title>
- <para>JBoss Portal uses the JBoss Microkernel for the service infrastructure. The JBoss Microkernel provides injection of services into other services, also known as wiring. It is only possible to inject
- dynamic proxies that talk to the MBeanServer, due to the Microkernel being JMX based. The overhead
- at runtime is minimal since the Microkernel implementation is highly optimized; however, when it is used
- with Java 5, a noticeable bottleneck appears due to the fact that the implementation
- of the JMX API classes, <emphasis>javax.management.*</emphasis>, provided by the Java Platform, performs synchronization. This does not occur under JDK 1.4 since those classes are implemented by JBoss MX.
+ <para>JBoss Portal uses the JBoss Microkernel for the service infrastructure. The JBoss Microkernel provides injection of services into other services, otherwise known as wiring. Due to the Microkernel being JMX based, tt is only possible to inject dynamic proxies that talk to the MBeanServer. The overhead at runtime is minimal since the Microkernel implementation is highly optimized; however, when it is used with Java 5, a noticeable bottleneck appears due to the fact that the implementation of the JMX API classes, <emphasis>javax.management.*</emphasis>, provided by the Java Platform, performs synchronization. This does not occur under JDK 1.4 since those classes are implemented by JBoss MX.
</para>
<para>
- JBoss Portal services use a special kind of Model MBean called <emphasis>JBossServiceModelMBean</emphasis>, which allows the un-wrapping of injected dynamic proxies, and replaces them with real plain old java object (POJO) services. This allows the removal of the bottleneck with Java 5, and also provides a performance boost on JDK 1.4. By default this feature is enabled, but it is possible to disabled is using the following command:
+ JBoss Portal services use a special kind of Model MBean called <emphasis>JBossServiceModelMBean</emphasis>, which allows the un-wrapping of injected dynamic proxies, and replaces them with real plain old java object (POJO) services. This allows the removal of the bottleneck with Java 5, and also provides a performance boost on JDK 1.4. By default this feature is enabled, but it is possible to disable. To do this on Linux systems, change into the <filename>$JBOSS_HOME/bin/</filename> directory and run the following command:
</para>
<para>
-<screen><![CDATA[
-./run.sh -Dportal.kernel.no_proxies=false]]>
+<screen>
+./run.sh -Dportal.kernel.no_proxies=false
</screen>
</para>
+<para>
+ On Microsoft Windows systems, run the following command:
+</para>
+<para>
+<screen>
+run.bat -Dportal.kernel.no_proxies=false
+</screen>
+</para>
</sect1>
</chapter>
18 years, 2 months
JBoss Portal SVN: r9796 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-02-06 02:04:41 -0500 (Wed, 06 Feb 2008)
New Revision: 9796
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml
Log:
rephrasing 3.6. Disabling Dynamic Proxy Un-wrapping
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml 2008-02-06 06:11:36 UTC (rev 9795)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml 2008-02-06 07:04:41 UTC (rev 9796)
@@ -250,7 +250,7 @@
</para>
</sect1>
<sect1>
- <title>Setting up proxy settings</title>
+ <title>Configuring proxy settings</title>
<para>There are a couple of scenarios where you will need your proxy to be correctly defined at the JVM
level so that you can access documents from Internet. It could be to get the thirdparty libraries if you
decided to build JBoss Portal from the sources, to access RSS feeds or weather information in the samples
@@ -261,19 +261,20 @@
is enough.</para>
</sect1>
<sect1>
- <title>Disabling dynamic proxy unwrapping</title>
- <para>JBoss Portal use the JBoss Microkernel for the service infrastructure. The JBoss Microkernel provides
- injection of services into other services, also known as wiring. Unfortunately it is only possible to inject
- dynamic proxies that talks to the MBeanServer due to the fact the Microkernel is JMX based. The overhead
- at runtime is minimal since the Microkernel implementation is highly optimized, however when it is used
- with Java 5 a noticeable bottleneck appears due to the fact that the implementation
- of the JMX API classes <emphasis>javax.management.*</emphasis> provided by the Java Platform performs synchronization. This does
- not happen under JDK 1.4 since those classes are implemented by JBoss MX.</para>
- <para>JBoss Portal services use a special kind of Model MBean called JBossServiceModelMBean which allows to
- unwrap the injected dynamic proxies and replace them by the real POJO services. This allows to remove the
- bottleneck with Java 5 and provide an extra boost of performances on JDK 1.4. By default that feature
- is enabled but it is possible to disabled it using command line arguments.</para>
- <programlisting><![CDATA[
->run.sh -Dportal.kernel.no_proxies=false]]></programlisting>
+ <title>Disabling Dynamic Proxy Un-wrapping</title>
+ <para>JBoss Portal uses the JBoss Microkernel for the service infrastructure. The JBoss Microkernel provides injection of services into other services, also known as wiring. It is only possible to inject
+ dynamic proxies that talk to the MBeanServer, due to the Microkernel being JMX based. The overhead
+ at runtime is minimal since the Microkernel implementation is highly optimized; however, when it is used
+ with Java 5, a noticeable bottleneck appears due to the fact that the implementation
+ of the JMX API classes, <emphasis>javax.management.*</emphasis>, provided by the Java Platform, performs synchronization. This does not occur under JDK 1.4 since those classes are implemented by JBoss MX.
+ </para>
+ <para>
+ JBoss Portal services use a special kind of Model MBean called <emphasis>JBossServiceModelMBean</emphasis>, which allows the un-wrapping of injected dynamic proxies, and replaces them with real plain old java object (POJO) services. This allows the removal of the bottleneck with Java 5, and also provides a performance boost on JDK 1.4. By default this feature is enabled, but it is possible to disabled is using the following command:
+ </para>
+ <para>
+<screen><![CDATA[
+./run.sh -Dportal.kernel.no_proxies=false]]>
+</screen>
+</para>
</sect1>
</chapter>
18 years, 2 months
JBoss Portal SVN: r9795 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-02-06 01:11:36 -0500 (Wed, 06 Feb 2008)
New Revision: 9795
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml
Log:
revising 3.4. Setting up the Email Service
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml 2008-02-06 03:23:05 UTC (rev 9794)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml 2008-02-06 06:11:36 UTC (rev 9795)
@@ -193,52 +193,62 @@
</sect2>
</sect1>
<sect1 id="emailConfiguration">
- <title>Setting up the email service</title>
- <para>To be able to use the email service (for example to verify user emails when someone subscribes or for CMS
- workflow notifications) it has to be configured correctly. To configure it, go to
- <literal>jboss-portal.sar/portal-core.sar/META-INF/jboss-service.xml</literal>.
- In this file, the mail module is configured like this:
- <programlisting><![CDATA[<mbean
- code="org.jboss.portal.core.impl.mail.MailModuleImpl"
- name="portal:service=Module,type=Mail"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends>jboss:service=Mail</depends>
- <depends>portal:service=Module,type=IdentityServiceController</depends>
- <attribute name="QueueCapacity">-1</attribute>
- <attribute name="Gateway">localhost</attribute>
- <attribute name="SmtpUser"></attribute>
- <attribute name="SmtpPassword"></attribute>
- <attribute name="JavaMailDebugEnabled">false</attribute>
- <attribute name="SMTPConnectionTimeout">100000</attribute>
- <attribute name="SMTPTimeout">10000</attribute>
- <attribute name="JNDIName">java:portal/MailModule</attribute>
-</mbean>]]></programlisting>
- Here you can specify a different SMTP server than localhost, then precise the SMTP username and SMTP password to
- use to send emails.</para>
- <para>For example, to use GMail's SMTP server:
- <programlisting><![CDATA[<mbean
- code="org.jboss.portal.core.impl.mail.MailModuleImpl"
- name="portal:service=Module,type=Mail"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends>jboss:service=Mail</depends>
- <depends>portal:service=Module,type=IdentityServiceController</depends>
- <attribute name="QueueCapacity">-1</attribute>
- <attribute name="Gateway">smtp.gmail.com</attribute>
- <attribute name="SmtpUser">username(a)gmail.com</attribute>
- <attribute name="SmtpPassword">myPassword</attribute>
- <attribute name="JavaMailDebugEnabled">false</attribute>
- <attribute name="SMTPConnectionTimeout">100000</attribute>
- <attribute name="SMTPTimeout">10000</attribute>
- <attribute name="JNDIName">java:portal/MailModule</attribute>
-</mbean>]]></programlisting>
+ <title>Setting up the Email Service</title>
+ <para>
+ If you have a standard setup and a mail server installed, the email service should work without any extra configuration. Most Linux distributions have a mail server installed by default. The email service, for example, can be used to verify a user's email address when a user subscribes, or for CMS workflow notifications.
</para>
- <note><para>If you have a 'standard' setup and a mail server installed
- (That's the case on most Linux distribution out of the box), it will work out of the box.</para></note>
- </sect1>
+ <para>
+ The email service is configured using the <filename>$JBOSS_HOME/server/default/deploy/jboss-portal.sar/META-INF/jboss-service.xml</filename> file. The following is an example of the section which is used to configure the email service:
+ </para>
+ <para>
+<screen><![CDATA[
+<mbean
+code="org.jboss.portal.core.impl.mail.MailModuleImpl"
+name="portal:service=Module,type=Mail"
+xmbean-dd=""
+xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+<xmbean/>
+<depends>jboss:service=Mail</depends>
+<depends>portal:service=Module,type=IdentityServiceController</depends>
+<attribute name="QueueCapacity">-1</attribute>
+<attribute name="Gateway">localhost</attribute>
+<attribute name="SmtpUser"></attribute>
+<attribute name="SmtpPassword"></attribute>
+<attribute name="JavaMailDebugEnabled">false</attribute>
+<attribute name="SMTPConnectionTimeout">100000</attribute>
+<attribute name="SMTPTimeout">10000</attribute>
+<attribute name="JNDIName">java:portal/MailModule</attribute>
+</mbean>]]>
+</screen>
+ </para>
+ <para>
+ A different SMTP server (other than localhost) can be configured, along with a SMTP username and an SMTP password. The following is an example configuration that uses the Gmail SMTP server:
+ </para>
+ <para>
+<screen><![CDATA[
+<mbean
+code="org.jboss.portal.core.impl.mail.MailModuleImpl"
+name="portal:service=Module,type=Mail"
+xmbean-dd=""
+xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+<xmbean/>
+<depends>jboss:service=Mail</depends>
+<depends>portal:service=Module,type=IdentityServiceController</depends>
+<attribute name="QueueCapacity">-1</attribute>
+<attribute name="Gateway">smtp.gmail.com</attribute>
+<attribute name="SmtpUser">username(a)gmail.com</attribute>
+<attribute name="SmtpPassword">myPassword</attribute>
+<attribute name="JavaMailDebugEnabled">false</attribute>
+<attribute name="SMTPConnectionTimeout">100000</attribute>
+<attribute name="SMTPTimeout">10000</attribute>
+<attribute name="JNDIName">java:portal/MailModule</attribute>
+</mbean>]]>
+</screen>
+ </para>
+ <para>
+ Using this example, replace <computeroutput>username(a)gmail.com</computeroutput> and <computeroutput>myPassword</computeroutput> with your correct Gmail username and password.
+ </para>
+</sect1>
<sect1>
<title>Setting up proxy settings</title>
<para>There are a couple of scenarios where you will need your proxy to be correctly defined at the JVM
18 years, 2 months
JBoss Portal SVN: r9794 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-02-05 22:23:05 -0500 (Tue, 05 Feb 2008)
New Revision: 9794
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml
Log:
revising 3.3.2. DB Dialect Settings for the CMS Component
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml 2008-02-06 02:43:45 UTC (rev 9793)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml 2008-02-06 03:23:05 UTC (rev 9794)
@@ -130,11 +130,11 @@
context-root other than <emphasis>/</emphasis>, under the <filename>$JBOSS_HOME/server/default/deploy/jboss-web.deployer/ROOT.war/WEB-INF/</filename> directory, for the above changes to take affect. The following is an example <filename>jboss-web.xml</filename> file, which changes the Tomcat context path to <computeroutput>/tomcat-root</computeroutput>:
</para>
<para>
-<programlisting><![CDATA[
+<screen><![CDATA[
<?xml version="1.0"?>
<jboss-web>
<context-root>/tomcat-root</context-root>
-</jboss-web>]]></programlisting>
+</jboss-web>]]></screen>
</para>
</note>
</para>
@@ -150,44 +150,47 @@
All <filename>hibernate.cfg.xml</filename> files in all JBoss Portal modules you intend to use need to be modified. The <filename>hibernate.cfg.xml</filename> files are found in the <filename>jboss-portal.sar/<replaceable>module</replaceable>/conf/hibernate/<replaceable>directory</replaceable>/</filename> directory, where <replaceable>module</replaceable> is the module name, and <replaceable>directory</replaceable> is a directory that, depending on the module, may or may not exist.
</para>
<para>
- To modify these files to force the DB dialect, un-comment the following line from each <filename>hibernate.cfg.xml</filename> file in each JBoss Portal module you intend to use:
+ To modify these files to force the DB dialect, un-comment the following line from each <filename>hibernate.cfg.xml</filename> file in each JBoss Portal module you intend to use, so that it looks like the following:
</para>
<para>
<screen><![CDATA[
<!-- Force the dialect instead of using autodetection -->
-<!--
<property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
--->
-]]>
-</screen>
+]]></screen>
</para>
<para>
- After un-commenting, the <filename>hibernate.cfg.xml</filename> will look as follows:
+ Note: this example is for a PostgreSQL database. If you use another database, you will need to modify <computeroutput>org.hibernate.dialect.PostgreSQLDialect</computeroutput> to reflect the correct database. For a list of supported dialects, refer to the <ulink url="http://www.hibernate.org/hib_docs/v3/reference/en/html/session-configurat...">dialects list on the Hibernate website</ulink>.
</para>
- <para>
+ </sect2>
+ <sect2>
+ <title>DB Dialect Settings for the CMS Component</title>
+ <para>
+ To modify the DB dialect setting for the JBoss Portal CMS component:
+ </para>
+ <para>
+ <orderedlist>
+ <listitem>
+ <para>
+ Open the <filename>jboss-portal.sar/portal-cms.sar/conf/hibernate/cms/hibernate.cfg.xml</filename> file.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Un-comment the following line, so that it looks like the following:
+ </para>
+ <para>
<screen><![CDATA[
<!-- Force the dialect instead of using autodetection -->
<property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
-]]>
-</screen>
+]]></screen>
+ </para>
+ </listitem>
+ </orderedlist>
</para>
<para>
- Note: these examples are for a PostgreSQL database. If you use another database, you will need to modify <computeroutput>org.hibernate.dialect.PostgreSQLDialect</computeroutput> to reflect the correct database.
+ Note: this example is for a PostgreSQL database. If you use another database, you will need to modify <computeroutput>org.hibernate.dialect.PostgreSQLDialect</computeroutput> to reflect the correct database. For a list of supported dialects, refer to the <ulink url="http://www.hibernate.org/hib_docs/v3/reference/en/html/session-configurat...">dialects list on the Hibernate website</ulink>.
</para>
</sect2>
- <sect2>
- <title>DB Dialect settings for the CMS component</title>
- <para>Modify <literal>jboss-portal.sar/portal-cms.sar/conf/hibernate/cms/hibernate.cfg.xml</literal> by
- uncommenting the following line in these files and using the appropriate dialect (see
- <ulink url="http://www.hibernate.org/hib_docs/v3/reference/en/html/session-configurat...">here
- </ulink> for a list of supported dialects in Hibernate 3):
- <programlisting><![CDATA[
-<!-- Force the dialect instead of using autodetection -->
-<!--
-<property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
--->]]></programlisting>
- </para>
- </sect2>
</sect1>
<sect1 id="emailConfiguration">
<title>Setting up the email service</title>
18 years, 2 months
JBoss Portal SVN: r9793 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-02-05 21:43:45 -0500 (Tue, 05 Feb 2008)
New Revision: 9793
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml
Log:
updating/revising, adding another example to:
3.3.1. Database Dialect Settings for JBoss Portal
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml 2008-02-06 02:37:14 UTC (rev 9792)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml 2008-02-06 02:43:45 UTC (rev 9793)
@@ -140,27 +140,40 @@
</para>
</sect1>
<sect1 id="configuration-hibdialect">
- <title>Forcing the DB dialect</title>
- <para>If you encounter that the Hibernate dialect is not working properly and would like to
- override the default behavior, follow the instructions contained in this section:
- <note>Under most common circumstances, the auto-detect feature should work fine.</note>
+ <title>Forcing the Database Dialect</title>
+ <para>
+ This sections describes how to override the Database (DB) dialect settings. Under most circumstances, the auto-detect feature will work. If the Hibernate dialect is not working correctly, override the default behavior by following the instructions in this section.
</para>
<sect2>
- <title>DB Dialect settings for Portal</title>
- <para>You will need to modify all the <literal>hibernate.cfg.xml</literal> files in all the Portal modules you
- intend to use by uncommenting the following line in these files and using the appropriate dialect (see
- <ulink url="http://www.hibernate.org/hib_docs/v3/reference/en/html/session-configurat...">here
- </ulink> for a list of supported dialects in Hibernate 3):
- <programlisting><![CDATA[
+ <title>Database Dialect Settings for JBoss Portal</title>
+ <para>
+ All <filename>hibernate.cfg.xml</filename> files in all JBoss Portal modules you intend to use need to be modified. The <filename>hibernate.cfg.xml</filename> files are found in the <filename>jboss-portal.sar/<replaceable>module</replaceable>/conf/hibernate/<replaceable>directory</replaceable>/</filename> directory, where <replaceable>module</replaceable> is the module name, and <replaceable>directory</replaceable> is a directory that, depending on the module, may or may not exist.
+ </para>
+ <para>
+ To modify these files to force the DB dialect, un-comment the following line from each <filename>hibernate.cfg.xml</filename> file in each JBoss Portal module you intend to use:
+ </para>
+ <para>
+<screen><![CDATA[
<!-- Force the dialect instead of using autodetection -->
<!--
<property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
--->]]></programlisting>
- </para>
- <para>These files are found in <literal>jboss-portal.sar/[module]/conf/hibernate/[directory]/hibernate.cfg.xml</literal>
- where <literal>[module]</literal> is a module name and <literal>[directory]</literal> is a directory that
- may or may not be present.
- </para>
+-->
+]]>
+</screen>
+ </para>
+ <para>
+ After un-commenting, the <filename>hibernate.cfg.xml</filename> will look as follows:
+ </para>
+ <para>
+<screen><![CDATA[
+<!-- Force the dialect instead of using autodetection -->
+<property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
+]]>
+</screen>
+ </para>
+ <para>
+ Note: these examples are for a PostgreSQL database. If you use another database, you will need to modify <computeroutput>org.hibernate.dialect.PostgreSQLDialect</computeroutput> to reflect the correct database.
+ </para>
</sect2>
<sect2>
<title>DB Dialect settings for the CMS component</title>
18 years, 2 months
JBoss Portal SVN: r9792 - in modules/portlet/trunk/test/src: main/java/org/jboss/portal/simple/samples and 3 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-02-05 21:37:14 -0500 (Tue, 05 Feb 2008)
New Revision: 9792
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/SimpleFragmentRenderer.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/GoogleClippingPortlet.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/GoogleWeatherClippingPortlet.java
modules/portlet/trunk/test/src/test/build.xml
modules/portlet/trunk/test/src/test/resources/google-map-portlet-war/WEB-INF/portlet.xml
modules/portlet/trunk/test/src/test/resources/google-weather-portlet-war/WEB-INF/portlet.xml
Log:
- Fixed sample portlets deployment and code. Should now work with public render parameters.
Modified: modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/SimpleFragmentRenderer.java
===================================================================
--- modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/SimpleFragmentRenderer.java 2008-02-06 01:25:04 UTC (rev 9791)
+++ modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/SimpleFragmentRenderer.java 2008-02-06 02:37:14 UTC (rev 9792)
@@ -50,7 +50,7 @@
}
StringBuilder builder = new StringBuilder(frag.length() + 50);
- builder.append("<div class=\"portlet\">").append(frag).append("</div>");
+ builder.append("<div class='portlet' style='border: 1px solid #aaa; background-color: #eee;'>").append(frag).append("</div>");
return builder.toString();
}
else
@@ -63,7 +63,7 @@
{
String html = error.toHTML();
StringBuilder builder = new StringBuilder(html.length() + 50);
- builder.append("<div class='error'>").append(html).append("</div>");
+ builder.append("<div class='error' style='border: 1px solid #aaa; background-color: #fee;'>").append(html).append("</div>");
return builder.toString();
}
}
Modified: modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/GoogleClippingPortlet.java
===================================================================
--- modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/GoogleClippingPortlet.java 2008-02-06 01:25:04 UTC (rev 9791)
+++ modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/GoogleClippingPortlet.java 2008-02-06 02:37:14 UTC (rev 9792)
@@ -33,6 +33,7 @@
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import java.io.BufferedInputStream;
+import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
@@ -66,24 +67,10 @@
URLConnection connection = url.openConnection();
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
- InputStream in = new BufferedInputStream(connection.getInputStream());
- StringBuilder tmp = new StringBuilder(8192);
- byte[] buffer = new byte[4096];
- while (true)
- {
- int i = in.read(buffer);
- if (i == 0)
- {
- continue;
- }
- if (i == -1)
- {
- break;
- }
- tmp.append(new String(buffer, "UTF-8"), 0, i);
- }
+ BufferedInputStream in = new BufferedInputStream(connection.getInputStream());
+ String html = new String(getBytes(in, 16384), "UTF-8");
+ in.close();
- String html = tmp.toString();
String beg = "<div class=e>";
String end = "</table>";
int begIndex = html.indexOf(beg);
@@ -173,4 +160,26 @@
{
return GOOGLE + zip;
}
+
+ private byte[] getBytes(InputStream in, int bufferSize) throws IOException, IllegalArgumentException
+ {
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+
+ byte[] buffer = new byte[bufferSize];
+ while (true)
+ {
+ int i = in.read(buffer);
+ if (i == 0)
+ {
+ continue;
+ }
+ if (i == -1)
+ {
+ break;
+ }
+ out.write(buffer, 0, i);
+ }
+ return out.toByteArray();
+ }
+
}
Modified: modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/GoogleWeatherClippingPortlet.java
===================================================================
--- modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/GoogleWeatherClippingPortlet.java 2008-02-06 01:25:04 UTC (rev 9791)
+++ modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/GoogleWeatherClippingPortlet.java 2008-02-06 02:37:14 UTC (rev 9792)
@@ -30,7 +30,7 @@
public class GoogleWeatherClippingPortlet extends GoogleClippingPortlet
{
private final static String WEATHER_URL = "http://www.google.com/search?q=weather+";
- private static final String A_END = "</a";
+ private static final String A_END = "</a>";
protected String getQueryString(String zip)
{
@@ -49,9 +49,9 @@
if (begIndex != -1)
{
endIndex = html.indexOf(A_END, begIndex);
- tmp = tmp.substring(0, begIndex) + html.substring(endIndex);
+ tmp = tmp.substring(0, begIndex) + html.substring(endIndex + A_END.length());
}
- return tmp;
+ return super.postProcessHTML(tmp);
}
}
Modified: modules/portlet/trunk/test/src/test/build.xml
===================================================================
--- modules/portlet/trunk/test/src/test/build.xml 2008-02-06 01:25:04 UTC (rev 9791)
+++ modules/portlet/trunk/test/src/test/build.xml 2008-02-06 02:37:14 UTC (rev 9792)
@@ -716,13 +716,6 @@
<path refid="mc.jboss_microcontainer"/>
<path refid="mc.jaxb-api"/>
- <!-- Portal dependencies -->
- <path>
- <pathelement path="${dependency.portal-common-portal.jar}"/>
- <pathelement path="${dependency.portal-portlet.jar}"/>
- </path>
-
-
<!-- For Tomcat -->
<path>
<pathelement path="${dependency.log4j.jar}"/>
@@ -740,9 +733,11 @@
<copy todir="${target}/simple-portal" flatten="true">
<path>
- <pathelement path="${dependency.portal-common.jar}"/>
- <pathelement path="${dependency.portal-web.jar}"/>
- <pathelement path="${dependency.jsr168api.jar}"/>
+ <path location="${dependency.portal-common.jar}"/>
+ <path location="${dependency.portal-common-portal.jar}"/>
+ <path location="${dependency.portal-portlet.jar}"/>
+ <path location="${dependency.portal-web.jar}"/>
+ <path location="${dependency.jsr168api.jar}"/>
</path>
</copy>
Modified: modules/portlet/trunk/test/src/test/resources/google-map-portlet-war/WEB-INF/portlet.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/google-map-portlet-war/WEB-INF/portlet.xml 2008-02-06 01:25:04 UTC (rev 9791)
+++ modules/portlet/trunk/test/src/test/resources/google-map-portlet-war/WEB-INF/portlet.xml 2008-02-06 02:37:14 UTC (rev 9792)
@@ -26,12 +26,27 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
version="2.0">
<portlet>
+ <description>Portlet displaying a location on Google Maps</description>
<portlet-name>GoogleMap</portlet-name>
+ <display-name>Google Map Portlet</display-name>
<portlet-class>org.jboss.portal.simple.samples.GoogleClippingPortlet</portlet-class>
<supports>
<mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ <portlet-mode>EDIT</portlet-mode>
</supports>
- <supported-public-render-parameter>g:zipcode</supported-public-render-parameter>
+ <portlet-info>
+ <title>Google Map Portlet</title>
+ <keywords>sample,map,google</keywords>
+ </portlet-info>
+ <portlet-preferences>
+ <preference>
+ <name>zipcode</name>
+ <value>94102</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+ <supported-public-render-parameter>zipcode</supported-public-render-parameter>
</portlet>
<public-render-parameter>
Modified: modules/portlet/trunk/test/src/test/resources/google-weather-portlet-war/WEB-INF/portlet.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/google-weather-portlet-war/WEB-INF/portlet.xml 2008-02-06 01:25:04 UTC (rev 9791)
+++ modules/portlet/trunk/test/src/test/resources/google-weather-portlet-war/WEB-INF/portlet.xml 2008-02-06 02:37:14 UTC (rev 9792)
@@ -26,12 +26,27 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
version="2.0">
<portlet>
+ <description>Portlet displaying the weather forecast for the specified location</description>
<portlet-name>GoogleWeather</portlet-name>
+ <display-name>Google Weather Portlet</display-name>
<portlet-class>org.jboss.portal.simple.samples.GoogleWeatherClippingPortlet</portlet-class>
<supports>
<mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ <portlet-mode>EDIT</portlet-mode>
</supports>
- <supported-public-render-parameter>g:zipcode</supported-public-render-parameter>
+ <portlet-info>
+ <title>Google Weather Portlet</title>
+ <keywords>sample,weather,google</keywords>
+ </portlet-info>
+ <portlet-preferences>
+ <preference>
+ <name>zipcode</name>
+ <value>94102</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+ <supported-public-render-parameter>zipcode</supported-public-render-parameter>
</portlet>
<public-render-parameter>
18 years, 2 months
JBoss Portal SVN: r9791 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-02-05 20:25:04 -0500 (Tue, 05 Feb 2008)
New Revision: 9791
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml
Log:
minor corrections
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml 2008-02-06 00:58:13 UTC (rev 9790)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml 2008-02-06 01:25:04 UTC (rev 9791)
@@ -62,7 +62,6 @@
<context-root>/portal</context-root>
<replication-config>
<replication-trigger>SET</replication-trigger>
- <replication-type>SYNC</replication-type>
</replication-config>
<resource-ref>
<res-ref-name>jdbc/PortalDS</res-ref-name>
@@ -81,24 +80,24 @@
</screen>
</para>
<para>
- Using this example, the JBoss Portal main page would be reached by navigating to <emphasis>http://localhost:8080/testing</emphasis>.
+ Using this example, the main JBoss Portal page would be reached by navigating to <emphasis>http://localhost:8080/testing</emphasis>.
</para>
</listitem>
</orderedlist>
</para>
<para>
- To change the context path before building from source:
+ To change the context path when building from source:
</para>
<para>
<orderedlist>
<listitem>
<para>
- Copy the <filename>JBOSS_PORTAL_INSTALLATION_DIRECTORY/build/etc/local.properties-example</filename> and save it as <filename>JBOSS_PORTAL_INSTALLATION_DIRECTORY/build/local.properties</filename>.
+ Change into the directory where the <filename>JBoss Portal Source Code</filename> zip file was extracted to, or where the source from SVN was checked out to. Copy the <filename>build/etc/local.properties-example</filename> file and save it as <filename>build/local.properties</filename>.
</para>
</listitem>
<listitem>
<para>
- Open the <filename>JBOSS_PORTAL_INSTALLATION_DIRECTORY/build/local.properties</filename> file and edit the <computeroutput>portal.web.context-root</computeroutput> section with the desired context path:
+ Open the <filename>build/local.properties</filename> file and edit the <computeroutput>portal.web.context-root</computeroutput> option with the desired context path:
</para>
<para>
<screen>
@@ -107,13 +106,13 @@
</screen>
</para>
<para>
- Using this example, the JBoss Portal main page would be reached by navigating to <emphasis>http://localhost:8080/testing</emphasis>.
+ Using this example, the main JBoss Portal page would be reached by navigating to <emphasis>http://localhost:8080/testing</emphasis>.
</para>
</listitem>
<listitem>
<para>
- To clean the project, make sure you are connected to the Internet, and change into the <filename>JBOSS_PORTAL_INSTALLATION_DIRECTORY/build/</filename> directory. Run the <command>ant clean</command> command.
+ To clean the project, make sure you are connected to the Internet, and change into the <filename>build/</filename> directory. Run the <command>ant clean</command> command.
</para>
</listitem>
<listitem>
@@ -128,7 +127,7 @@
<para>
By default, Tomcat holds on to the root context, <emphasis>/</emphasis>. You may need to remove the <filename>$JBOSS_HOME/server/default/deploy/jboss-web.deployer/ROOT.war/</filename> directory,
or add a <filename>jboss-web.xml</filename> file, which declares another
- context-root other than <emphasis>/</emphasis>, under the <filename>$JBOSS_HOME/server/default/deploy/jboss-web.deployer/ROOT.war/WEB-INF/</filename> directory, for the above changes to take affect. The following is an example <filename>jboss-web.xml</filename> file, which changes the context path to <computeroutput>/tomcat-root</computeroutput>:
+ context-root other than <emphasis>/</emphasis>, under the <filename>$JBOSS_HOME/server/default/deploy/jboss-web.deployer/ROOT.war/WEB-INF/</filename> directory, for the above changes to take affect. The following is an example <filename>jboss-web.xml</filename> file, which changes the Tomcat context path to <computeroutput>/tomcat-root</computeroutput>:
</para>
<para>
<programlisting><![CDATA[
18 years, 2 months
JBoss Portal SVN: r9790 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-02-05 19:58:13 -0500 (Tue, 05 Feb 2008)
New Revision: 9790
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml
Log:
revising/adding content to:
3.2. Changing the Context Path
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml 2008-02-05 23:59:16 UTC (rev 9789)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml 2008-02-06 00:58:13 UTC (rev 9790)
@@ -46,43 +46,22 @@
</para>
</sect1>
<sect1 id="configuration-contextroot">
- <title>Changing the context path</title>
- <para>By default, the "main" page of JBoss portal will be accessible at
- <literal>http://localhost:8080/portal/index.html</literal>
- . You may want to change that
- either to a different name or to
- <literal>http://localhost:8080/index.html</literal>
- .
- </para>
- <note>
- By default, Tomcat holds on to the root context '/'. You may need to either remove
- <literal>$JBOSS_HOME/server/default/deploy/jboss-web.deployer/ROOT.war</literal>
- or add a <literal>jboss-web.xml</literal> file (declaring another context-root other than '/') under
- <literal>ROOT.war/WEB-INF</literal> directory for the below changes to take effect on restart.
- <programlisting><![CDATA[
-<?xml version="1.0"?>
-<jboss-web>
- <context-root>/tomcat-root</context-root>
-</jboss-web>]]></programlisting>
- </note>
- <para>You can accomplish this, with either a deployed jboss-portal.sar or before you build from source:
- <itemizedlist>
- <listitem>
- <para>
- <emphasis role="bold">Binary method:</emphasis>
- <orderedlist>
- <listitem>
- <para>Open
- <emphasis>
- JBOSS_INSTALL_DIRECTORY/server/default/deploy/jboss-portal.sar/portal-server.war/WEB-INF/jboss-web.xml
- </emphasis>
+ <title>Changing the Context Path</title>
+ <para>By default, the main JBoss Portal page is accessible by navigating to <emphasis>http://localhost:8080/portal/index.html</emphasis>. This
+can be changed to a different path, for example,
+<emphasis>http://localhost:8080/index.html</emphasis>. The context path can be changed when using the deployed <filename>jboss-portal.sar/</filename>, or before building from source. To change the context path when using the JBoss Portal binary package:
+</para>
+<para>
+ <orderedlist>
+ <listitem>
+ <para>Open the <emphasis>$JBOSS_HOME/server/default/deploy/jboss-portal.sar/portal-server.war/WEB-INF/jboss-web.xml</emphasis> file. If this file does not exist, copy and save the following example:
<programlisting><![CDATA[
<?xml version="1.0"?>
<jboss-web>
<security-domain>java:jaas/portal</security-domain>
<context-root>/portal</context-root>
<replication-config>
- <replication-trigger>SET_AND_GET</replication-trigger>
+ <replication-trigger>SET</replication-trigger>
<replication-type>SYNC</replication-type>
</replication-config>
<resource-ref>
@@ -94,34 +73,72 @@
</listitem>
<listitem>
<para>Edit the
- <emphasis>context-root</emphasis>
- element to whatever you desire.
- <programlisting><![CDATA[<context-root>/</context-root>]]></programlisting>
- </para>
+ <computeroutput><context-root></computeroutput> element with the desired context path:
+ </para>
+ <para>
+<screen>
+<![CDATA[<context-root>/testing</context-root>]]>
+</screen>
+ </para>
+ <para>
+ Using this example, the JBoss Portal main page would be reached by navigating to <emphasis>http://localhost:8080/testing</emphasis>.
+ </para>
</listitem>
</orderedlist>
</para>
- </listitem>
+ <para>
+ To change the context path before building from source:
+ </para>
+ <para>
+ <orderedlist>
<listitem>
<para>
- <emphasis role="bold">Source method:</emphasis>
- Edit the file
- <literal>$PORTAL_HOME/build/local.properties</literal>
- (You can copy the file
- <literal>$PORTAL_HOME/build/etc/local.properties-example</literal>
- and modify it for your
- own settings.) and change
- <literal>portal.web.context-root</literal>
- to anything you want.
- <para>Now clean the project (ant clean) then build JBoss portal (ant) and redeploy it for the context
- path changes to take
- effect. For build instructions, please see:
- <xref linkend="install_source"/>
- </para>
- </para>
- </listitem>
- </itemizedlist>
- </para>
+ Copy the <filename>JBOSS_PORTAL_INSTALLATION_DIRECTORY/build/etc/local.properties-example</filename> and save it as <filename>JBOSS_PORTAL_INSTALLATION_DIRECTORY/build/local.properties</filename>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Open the <filename>JBOSS_PORTAL_INSTALLATION_DIRECTORY/build/local.properties</filename> file and edit the <computeroutput>portal.web.context-root</computeroutput> section with the desired context path:
+ </para>
+ <para>
+<screen>
+# Context root for the portal main servlet
+portal.web.context-root=/testing
+</screen>
+ </para>
+ <para>
+ Using this example, the JBoss Portal main page would be reached by navigating to <emphasis>http://localhost:8080/testing</emphasis>.
+ </para>
+ </listitem>
+ <listitem>
+
+ <para>
+ To clean the project, make sure you are connected to the Internet, and change into the <filename>JBOSS_PORTAL_INSTALLATION_DIRECTORY/build/</filename> directory. Run the <command>ant clean</command> command.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Re-build and re-deploy JBoss Portal. See <xref linkend="install_source"/> for build instructions.
+ </para>
+ </listitem>
+ </orderedlist>
+</para>
+ <para>
+ <note>
+ <para>
+ By default, Tomcat holds on to the root context, <emphasis>/</emphasis>. You may need to remove the <filename>$JBOSS_HOME/server/default/deploy/jboss-web.deployer/ROOT.war/</filename> directory,
+ or add a <filename>jboss-web.xml</filename> file, which declares another
+ context-root other than <emphasis>/</emphasis>, under the <filename>$JBOSS_HOME/server/default/deploy/jboss-web.deployer/ROOT.war/WEB-INF/</filename> directory, for the above changes to take affect. The following is an example <filename>jboss-web.xml</filename> file, which changes the context path to <computeroutput>/tomcat-root</computeroutput>:
+ </para>
+ <para>
+<programlisting><![CDATA[
+<?xml version="1.0"?>
+<jboss-web>
+ <context-root>/tomcat-root</context-root>
+</jboss-web>]]></programlisting>
+ </para>
+ </note>
+</para>
</sect1>
<sect1 id="configuration-hibdialect">
<title>Forcing the DB dialect</title>
18 years, 2 months
JBoss Portal SVN: r9789 - modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-02-05 18:59:16 -0500 (Tue, 05 Feb 2008)
New Revision: 9789
Added:
modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/portal.xml
Log:
add sample file describing portal structure
Added: modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/portal.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/portal.xml (rev 0)
+++ modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/portal.xml 2008-02-05 23:59:16 UTC (rev 9789)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<portal>
+ <pages>
+ <page name="default">
+ <column name="center">
+ <window>
+ <portlet application="google-map-portlet" name="GoogleMap"/>
+ </window>
+ <window>
+ <portlet application="google-weather-portlet" name="GoogleWeather"/>
+ </window>
+ </column>
+ </page>
+ </pages>
+</portal>
18 years, 2 months