[JBoss Portal] - Adding custom Window Property
by d.haslinger
Hello!
I've written a custom portlet that displays the content of an html file from the filesystem.
The location of this file is set by a custom property called "content", which value contains the path to the html file.
Currently I'm setting this property manually directly in the portal.
In the doView() method of the portlet, i receive the properties with:
| PortalNode node = Navigation.getCurrentNode();
| Map props = node.getProperties();
This works fine, but the problem is that I do not want to add the content property manually each time, I want to add it directly in the code, like:
PortalNode node = Navigation.getCurrentNode();
| Map props = node.getProperties();
|
| if(!props.containsKey("content")){
| props.put("content", "/html/file.html");
| }
But this throws a java.lang.UnsupportedOperationException.
Can any one please help me with this?
Thanks a lot in advance,
Daniel
Server: 4.2.2
Portal: 2.6.3
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4149696#4149696
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4149696
17 years, 11 months
[JBoss jBPM] - access defaultds
by AJanz
hi
i am using jbpm-jpdl-suite-3.2.2. i am trying to connect to the defaultds. but i got the error "DefaultDS not bound"
when i use the jndiview from web-console i see that it is there....
i use the following code, what am i doing wrong?
|
| Hashtable<String, String> env;
| env = new Hashtable<String, String>();
| env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
| env.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jn.interfaces");
| env.put("java.naming.provider.url","jnp://localhost:1099");
| Context initContext = new InitialContext(env);
| DataSource ds = (DataSource)initContext.lookup("java:/DefaultDS");
|
|
server runs in a seperate window.
my code is executed with eclipse
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4149694#4149694
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4149694
17 years, 11 months
[Installation, Configuration & DEPLOYMENT] - scheduled service not running after porting to 4.2.2
by AndrewThio
Hi Everyone
I just took over from my predecessor. As part of my learning & also to support an application, I have been migrating from JBoss4.01 to JBoss4.2.2.
I thought that I had successfully got my applications running but have just realised that my scheduled services dont seemed to be running.
The jboss-service.xml for this sar file is
<server>
| <mbean code="org.jboss.varia.scheduler.Scheduler"
| name="waycopConn:service=ClearReversal">
| <attribute name="StartAtStartup">true</attribute>
| <attribute name="SchedulableClass">sg.com.waysystems.waycopConn.scheduler.CleanReversal</attribute>
| <!--
| <attribute name="InitialStartDate">1/1/2001 1:00 am</attribute>
| -->
| <attribute name="InitialStartDate">NOW</attribute>
| <attribute name="SchedulePeriod">120000</attribute>
| <attribute name="InitialRepetitions">-1</attribute>
| <depends>
| <mbean code="javax.management.timer.Timer" name="jboss:service=MyServiceTimer"/>
| </depends>
| </mbean>
| </server>
I have checked from jmx console that both the beans have started:
- ClearReversal
- MyServiceTimer
Despite this, ClearReversal doesnt seem to run (I have some debug messages & they are not appearing in the server.log)
I have tried looking in the config manual & on the Web but can't seem to find what other configurations are supposed to be added (many of the examples on the web are similar to my config)
Does anyone have any suggestions on what I need to set?
(By the way, the same SAR file runs fine under jBoss4.0.1 also on JRE1.6)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4149693#4149693
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4149693
17 years, 11 months