[JBoss Portal Users] - "support-public-render-paramter" or "coordination feature"
by Fuchs
hello everybody,
iam using jboss portal 2.7.2 with jsf 1.1.14, richfaces 3.1.1 and of course the portletbridge 1.0.0.CR1.
Now i have to send Integer Parameters from Portlet A to Portlet B.
Therefor i found an example which says,
1. in the protlet.xml
| <init-param>
| <name>com.sun.faces.portlet.SAVE_REQUEST_SCOPE</name>
| <value>true</value>
| </init-param>
|
2. also in portlet.xml
| <portlet-app>
| <portlet>
| ...........
| <supported-public-render-parameter>helloForm:userNo</supported-public-render-parameter>
| </portlet>
| <public-render-parameter>
| <identifier>helloForm:userNo</identifier>
| <qname xmlns:x="http://www.sun.com/params">x:userNumber</qname>
| </public-render-parameter>
| </portlet-app>
|
3. in the jsf file of the sending portlet (...xhtml)
| <f:view>
| <h:form id="helloForm">
| .............
| <h:inputText id="userNo" value="#{UserNumberBean.userNumber}"
| validator="#{UserNumberBean.validate}"/>
| .................
| </h:form>
| </f:view>
|
4. in the jsf file (...xhtml)
| FacesContext context = FacesContext.getCurrentInstance();
| PortletRequest request = (PortletRequest)context.getExternalContext().getRequest();
| return request.getParameter("helloForm:userNo");
|
to get the public paramter.
i become no error, but also not the parameter.
the question is, do someone knows how to send a parameter from portlet A to B?
Thx for reading my question!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4253731#4253731
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4253731
15 years, 4 months
[JNDI and Naming] - EJB 3.0 and JNDI problems
by gk-bgh
Hello all!
I need some help with the following:
Web Server - Jboss 5.1.0 GA
IDE - eclipse
I created a EJB project using eclipse and the following files:
ejb.server.HelloWorld.HelloWorldBeanRemote
| package ejb.server.HelloWorld;
| import javax.ejb.Remote;
|
| @Remote
| public interface HelloWorldBeanRemote {
| public void sayHelloRemoto();
| }
|
|
|
ejb.server.HelloWorld.HelloWorldBeanLocal
| package ejb.server.HelloWorld;
| import javax.ejb.Local;
|
| @Local
| public interface HelloWorldBeanLocal {
| public void sayHelloLocal();
| }
|
|
ejb.server.HelloWorld.HelloWorldBean
| package ejb.server.HelloWorld;
|
| import javax.ejb.Stateless;
|
| /**
| * Session Bean implementation class HelloWorldBean
| */
| @Stateless
| public class HelloWorldBean implements HelloWorldBeanRemote, HelloWorldBeanLocal {
|
| /**
| * Default constructor.
| */
| public HelloWorldBean() {
| // TODO Auto-generated constructor stub
| }
|
| @Override
| public void sayHelloRemoto() {
| // TODO Auto-generated method stub
| System.out.println("Remoto");
| }
|
| @Override
| public void sayHelloLocal() {
| // TODO Auto-generated method stub
| System.out.println("Local");
| }
|
| }
|
|
and the client
| package ejb.client;
|
| import java.util.Properties;
|
| import javax.naming.InitialContext;
| import javax.naming.NamingException;
| import javax.rmi.PortableRemoteObject;
|
| import ejb.server.HelloWorld.HelloWorldBean;
| import ejb.server.HelloWorld.HelloWorldBeanRemote;
|
| public class EJBClient {
|
| /**
| * @param args
| */
| public static void main(String[] args) {
| // TODO Auto-generated method stub
| try {
| Properties properties = new Properties();
| properties.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
| properties.put("java.naming.factory.url.pkgs","=org.jboss.naming:org.jnp.interfaces");
| properties.put("java.naming.provider.url","jnp://localhost:1099");
| InitialContext context = new InitialContext(properties);
|
|
| Object bean = context.lookup("HelloWorldBean/remote");
| Object bean2 = context.lookup(HelloWorldBean.class.getSimpleName()+"/remote");
|
| HelloWorldBeanRemote beanH = (HelloWorldBeanRemote)PortableRemoteObject.narrow(bean, HelloWorldBeanRemote.class);
| //Object bean3 = context.lookup("HelloWorldBean/local");
| //bean.sayHelloRemoto();
| System.out.println(bean);
| System.out.println(bean2);
| System.out.println(beanH);
|
| } catch (NamingException e) {
| // TODO Auto-generated catch block
| e.printStackTrace();
| }
| }
|
| }
|
|
|
I execute the project from Eclipse and my ejb is deployed as I get the message:
11:27:41,999 INFO [EJBContainer] STARTED EJB: ejb.server.HelloWorld.HelloWorldBean ejbName: HelloWorldBean
11:27:42,018 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
HelloWorldBean/remote - EJB3.x Default Remote Business Interface
HelloWorldBean/remote-ejb.server.HelloWorld.HelloWorldBeanRemote - EJB3.x Remote Business Interface
HelloWorldBean/local - EJB3.x Default Local Business Interface
HelloWorldBean/local-ejb.server.HelloWorld.HelloWorldBeanLocal - EJB3.x Local Business Interface
When I run the client as a JAVA APPLICATION I get the output:
Proxy to jboss.j2ee:jar=EJB.jar,name=HelloWorldBean,service=EJB3 implementing [interface ejb.server.HelloWorld.HelloWorldBeanRemote]
Proxy to jboss.j2ee:jar=EJB.jar,name=HelloWorldBean,service=EJB3 implementing [interface ejb.server.HelloWorld.HelloWorldBeanRemote]
Proxy to jboss.j2ee:jar=EJB.jar,name=HelloWorldBean,service=EJB3 implementing [interface ejb.server.HelloWorld.HelloWorldBeanRemote]
What I am doing wrong that I dont get the object I want from the Container?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4253730#4253730
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4253730
15 years, 4 months
[jBPM Users] - Re: NullPointer Exception when starting a process whith Tomc
by hidman78
| java.lang.NullPointerException
| at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceByKey(ExecutionServiceImpl.ja
| va:66)
| at javaclass.DAO.BillDAO.findByExample(BillDAO.java:45)
| at javaclass.action.ListBillAction.execute(ListBillAction.java:29)
| at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
| at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
| at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
| at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
| at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
| at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
| at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
| at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
| at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290
| )
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
|
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
| at java.lang.Thread.run(Unknown Source)
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4253726#4253726
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4253726
15 years, 4 months