[JBoss Portal] - Portlet rendering through servlet
by iamnew2jboss
Hello There
Thomas, Julian,
I've a business requirement of rendering a portlet from a Servlet. There won't be JSPs with:
<portal:page>
<portal:pageparam>
<xportal:portlet> etc.
Instead, servlet would need to read and render the portlet deployed in the "webapps" directory.
Below is some code that I'm playing with.
|
| QName name = new QName("urn:jboss:portal:simple:google", "zipcode");
| boolean frozen = true;
| PageParameterDef parameterDef = new PageParameterDef(name, "94939", frozen);
|
| Map<QName, PageParameterDef> paramDefs;
| paramDefs = new HashMap<QName, PageParameterDef>();
| paramDefs.put(name, parameterDef);
|
| int size = paramDefs.size();
| out.write("The size is::::: " + size);
|
| Mode initialMode = Mode.VIEW;
| final Set<Mode> DEFAULT_MODES = Collections.unmodifiableSet(Tools.toSet(Mode.VIEW, Mode.EDIT, Mode.HELP));
| final Set<WindowState> DEFAULT_WINDOW_STATES = Collections.unmodifiableSet(Tools.toSet(WindowState.NORMAL, WindowState.MAXIMIZED, WindowState.MINIMIZED));
|
|
| WindowDef windowDef = new WindowDef("PagePortlet", "2-PagePortlet", "1", initialMode, DEFAULT_MODES, DEFAULT_WINDOW_STATES);
|
|
|
| Map<String, WindowDef> windowDefs;
| windowDefs = new HashMap<String, WindowDef>();
| paramDefs = new HashMap<QName, PageParameterDef>();
| windowDefs.put("1", windowDef);
|
|
|
| WindowState ws = WindowState.MAXIMIZED;
| WindowDef windowDefNew = windowDefs.get("1");
|
|
| try {
| response.setContentType("text/html;charset=UTF-8");
| application = getServletContext();
|
|
| out.write("\n");
| out.write("\n");
| out.write("\n");
| out.write("\n");
| out.write("\n");
| out.write("\n");
| out.write("\r\n");
| out.write("application::: " + application.toString());
| out.write("\n");
| out.write("windowDef " + windowDefs);
| out.write("\n");
| out.write("windowDefNew.getApplicationName(): " + windowDefNew.getApplicationName());
|
| } catch (Throwable t) {
| }
The output i'm getting in the browser is:
The size is::::: 1 application::: org.apache.catalina.core.ApplicationContextFacade@1083717 windowDef {1=org.jboss.portal.portlet.portal.jsp.WindowDef@58cca9} windowDefNew.getApplicationName(): 2-PagePortlet
I tried to figure out the rendering logic from the "sources" but couldnt find the appropriate classes. Can anybody please guide me in a right direction so that I can render the portlet window through servlet?
Is it possible to get an architectural diagram of all the classes involved and their relationship with each other?
Thank you in advance.
Regards.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166018#4166018
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166018
17 years, 9 months
[JBoss Tools (users)] - deployment problem
by freakwave
Hi all,
I just created a new SEAM Web project in MyEclipse 6.5 (Europa).
type: EAR
server: jboss 4.2.2GA
jboss tools 2.1.2GA
To deploy I am able to add 2 projects to the jboss server:
<actual project name>-ear
/lib/<project name>-ear/EarContent
when I click on deploy I get the following error:
BUILD FAILED
C:\Program Files\MyEclipse 6.5\myeclipse\eclipse\plugins\org.eclipse.jst.server.generic.jboss_1.5.105.v200709061325\buildfiles\jboss323.xml:17: Problem creating jar: C:\Projects\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\lib\BasisDataNewPrototype-ear\EarContent\jboss-seam.jar.jar (The system cannot find the path specified) (and the archive is probably corrupt but I could not delete it)
Thanks all for your help,
Wolfgang
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166017#4166017
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166017
17 years, 9 months
[JBoss jBPM] - Re: Difference pooled-actors and swimlanes
by kukeltje
anonymous wrote : Where should the user be selected?
In your own webapp or some other way (rules engine, whatever)
anonymous wrote : "originally assigned"?
The one that is selected e.g. by your webapp above
anonymous wrote : Sorry, but this part is also not easy to understand. So at any time I have to assign an individual actor explicitly to a task? I mean, my application is still doing what I expect by not assigning the user explicitly.
|
That is because you have to think differently. Look at some of the testcases in the source about taskmanagement and much will be clearer.
- Task is created and assigned to pooled actors
- Task is visible in pooled tasklist
- Task is done by one person e.g. in 1 day
- Task should not be visible in pooled tasklist since someone is working on it
- Therefor assign to actor, but leave the pooled actors also assigned
- If User gets sick, make actor 'null' and task is visible again in pooled tasklist
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166011#4166011
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166011
17 years, 9 months
[JBoss Cache: Core Edition] - JBoss Cache performance looks pretty poor :(
by phpguy99
Hi,
I'm evaluating various java-based distributed caching solutions: JBoss Cache (version 2.1.1 GA), EHCache, and TerraCotta.
My data size is 10 million objects and using 3 nodes each with 10GB HeapSize.
So far EHCache is proven to be very fast, reliable (never goes down for many tests iteration for many hours), and uses small footprint. I can do 40,000 puts/second on 3 nodes cluster.
Ok - I'm here to ask about JBoss Cache.
Putting 1 million Objects (small ones - consisting of 3-4 Strings), the rate is like 2000/second, and once I start the second node the second node just dies right away giving me this error:
org.jboss.cache.CacheException: Unable to fetch state on startup
.....
The memory usage is way too high. 1 million objects give require 2GB of Heap (after I GC'd of course and watched this from JConsole).
They way I'm using the tree cache is I create *all* 1 million objects on their own node/fqn. So I have ROOT/Object-1, ROOT/Object-2 ... ROOT/Object-1000000.
My configuration file:
<?xml version="1.0" encoding="UTF-8"?>
jboss:service=Naming
jboss:service=TransactionManager
org.jboss.cache.transaction.GenericTransactionManagerLookup
READ_COMMITTED
false
REPL_SYNC
JBossCache-Cluster
<UDP mcast_addr="228.1.2.3" mcast_port="48866"
ip_ttl="64" ip_mcast="true"
mcast_send_buf_size="150000" mcast_recv_buf_size="80000"
ucast_send_buf_size="150000" ucast_recv_buf_size="80000"
loopback="false"/>
<PING timeout="2000" num_initial_members="3"/>
<MERGE2 min_interval="10000" max_interval="20000"/>
<FD_SOCK/>
<VERIFY_SUSPECT timeout="1500"/>
<pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800" />
<pbcast.STABLE desired_avg_gossip="400000"/>
<FC max_credits="2000000" min_threshold="0.10"/>
<FRAG2 frag_size="8192"/>
<pbcast.GMS join_timeout="5000" shun="true" print_local_addr="true"/>
<pbcast.STATE_TRANSFER/>
20000
20000
15000
I believe I'm missing something here so be great if anybody can help.
Thanks a lot.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166009#4166009
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166009
17 years, 9 months