[jboss-cvs] jboss-portal/core/src/main/org/jboss/portal/core/deployment/jboss ...
Julien Viet
julien at jboss.com
Thu Aug 3 13:06:47 EDT 2006
User: julien
Date: 06/08/03 13:06:46
Modified: core/src/main/org/jboss/portal/core/deployment/jboss
PortletAppDeployment.java
Log:
- make an instance creation faillure not prevent the creational of other instances
- removed theme portlet as it changes the theme globally and is rather confusing as we have the new feature of having per user theme configuration in the profile
Revision Changes Path
1.63 +60 -37 jboss-portal/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: PortletAppDeployment.java
===================================================================
RCS file: /cvsroot/jboss/jboss-portal/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -b -r1.62 -r1.63
--- PortletAppDeployment.java 12 Jul 2006 09:29:54 -0000 1.62
+++ PortletAppDeployment.java 3 Aug 2006 17:06:46 -0000 1.63
@@ -35,6 +35,8 @@
import org.jboss.portal.core.model.instance.DuplicateInstanceException;
import org.jboss.portal.core.model.instance.InstanceContainer;
import org.jboss.portal.portlet.NoSuchPortletException;
+import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.InvalidPortletIdException;
import org.jboss.portal.portlet.impl.jsr168.metadata.PreferenceMetaData;
import org.jboss.portal.security.spi.provider.SecurityConfigurationException;
import org.jboss.portal.security.metadata.SecurityConstraintsMetaData;
@@ -54,7 +56,7 @@
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
- * @version $Revision: 1.62 $
+ * @version $Revision: 1.63 $
*/
public class PortletAppDeployment extends org.jboss.portal.portlet.deployment.jboss.PortletAppDeployment
{
@@ -266,7 +268,7 @@
}
}
- protected void createInstances(List instanceMDs) throws Exception
+ private void createInstances(List instanceMDs) throws Exception
{
// Create all the instances when possible
for (int i = 0; i < instanceMDs.size(); i++)
@@ -276,6 +278,20 @@
//
if (factory.getInstanceContainer().getInstance(instanceMD.getId()) == null)
{
+ createInstance(instanceMD);
+ }
+ else
+ {
+ log.debug("Instance " + instanceMD.getId() + " exist");
+ }
+ }
+ }
+
+ /**
+ * Requires a transaction to execute, setup in aop configuration.
+ */
+ private void createInstance(InstanceMetaData instanceMD)
+ {
try
{
log.debug("Creating portlet instance " + instanceMD.getId());
@@ -294,8 +310,21 @@
}
catch (NoSuchPortletException e)
{
- //
- String msg = "Failed to create instance " + instanceMD.getId() + " of portlet " + e.getPortletId();
+ String msg = "Failed to create instance " + instanceMD.getId() + " of portlet " + e.getPortletId() +
+ " because portlet " + e.getPortletId() + " is not available";
+ log.warn(msg);
+ log.debug(msg, e);
+ }
+ catch (InvalidPortletIdException e)
+ {
+ String msg = "Failed to create instance " + instanceMD.getId() + " of portlet " + e.getPortletId() +
+ " because portlet id " + e.getPortletId() + " is invalid";
+ log.warn(msg);
+ log.debug(msg, e);
+ }
+ catch (PortletInvokerException e)
+ {
+ String msg = "Failed to create instance " + instanceMD.getId() + " of portlet";
log.warn(msg);
log.debug(msg, e);
}
@@ -312,10 +341,4 @@
log.debug(msg, e);
}
}
- else
- {
- log.debug("Instance " + instanceMD.getId() + " exist");
- }
- }
- }
}
More information about the jboss-cvs-commits
mailing list