[JBoss Seam] - execute action and remote method simultaneously?
by FredF
Hello.
I use Seam 2.0.0 BETA1 with facelets (Sun JSF 1.2 RI)
I am having problem executing a WebRemote method and an action method from the same commandButton.
On the frontend I have an xhtml page with an editor (FCKeditor) combined with a form bound to a seam datamodel component. The remote method on the seam component shall recieve the content of the editor (because it cannot have a jsf value binding) and the action shall recieve the datamodel.
The seam component looks like this:
| public class ArtistPresentationActionBean extends ArtistPresentationActionBase
| implements ArtistPresentationActionLocal,
| ArtistPresentationActionRemote {
|
| public java.lang.String handleUpdateArtistPresentation() throws FactDaoException,
| ContentProviderAccountDaoException {
| // implementation
|
| }
|
| @Override
| protected void handleSetDescription(String description) throws Exception {
| // implementation. Annotated with @WebRemote on the local interface
| }
|
| }
The commandButton on the form looks like this:
<h:commandButton type="submit" onClick="setDescriptionAsync()" value="Save changes" action="#{artistpresentation.updateArtistPresentation}" />
The javascript function setDescriptionAsync looks like this:
| function setDescriptionAsynch() {
| oEditor = FCKeditorAPI.GetInstance('MyTextarea');
| editorContent = oEditor.GetHTML();
| Seam.Component.getInstance("artistpresentation").setDescription(editorContent);
| }
The problem is that only the remote method is executed, not the action. And when the remote call is finished executing I get a javascript exception in the browser saying that in remote.js at line 644 there is some problem with
if (req.status == 200)
and from there I am not sure what is wrong. Must be something with the response from the call. There are no exceptions thrown from the seam component after remote execution (not what I can see in the log, except of course in the browser).
If I remove the onClick attribute on the commandButton the action is executed as expected without any failures.
I reed in a book; Jboss Seam Simplicity and Power Beyond Java EE chap. 17.3.2 that it should work to execute both actions and remote methods in the same commandButton.
Anyone experiencing the same thing?
Thanks,
Fredrik
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077390#4077390
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4077390
18Â years, 8Â months
[JBoss Seam] - Remoting problem - Component not found
by fredgen
Hello,
I'm trying to add remoting to webapp i'm working on, but have got stuck at "hello world" ... Can anyone please look at code bellow, and tell me what i have missed ;(
import javax.ejb.Stateless;
| import org.jboss.seam.annotations.Name;
|
| @Stateless
| @Name("concernActions")
| public class ConcernRemoteBean implements ConcernRemote {
|
| public String getAttachments(String str) {
| return "first<br />second<br />";
| }
| }
import javax.ejb.Local;
| import org.jboss.seam.annotations.WebRemote;
|
| @Local
| public interface ConcernRemote {
|
| @WebRemote
| public String getAttachments(String str);
|
| }
|
i also have in web.xml
<servlet>
| <servlet-name>Seam Resource Servlet</servlet-name>
| <servlet-class>org.jboss.seam.servlet.ResourceServlet</servlet-class>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>Seam Resource Servlet</servlet-name>
| <url-pattern>/seam/resource/*</url-pattern>
| </servlet-mapping>
i can invoke
/seam/resource/remoting/resource/remote.js
but when try to invoke
/seam/resource/remoting/interface.js?getAttachments
i get
16:27:23,065 ERROR [InterfaceGenerator] Component not found: [getAttachments]
| 16:27:23,066 ERROR [Remoting] Error
| javax.servlet.ServletException: Invalid request - component not found.
| at org.jboss.seam.remoting.InterfaceGenerator.handle(InterfaceGenerator.java:96)
| at org.jboss.seam.remoting.Remoting.getResource(Remoting.java:110)
| at org.jboss.seam.servlet.ResourceServlet.doGet(ResourceServlet.java:68)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:619)
|
Thanks,
Zbyszko
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077389#4077389
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4077389
18Â years, 8Â months
[JNDI/Naming/Network] - MDB listening to Websphere MQ - invalid security authenticat
by dagast2
I have been more or less following the popular UsingWebSphereMQSeriesWithJBossAS tutorial to configure JBoss to communicate with Websphere MQ. Things seem to be working as described, however, when I try to deploy a MDB with a <message-driven> destination of the Websphere MQ I receive the following error:
10:45:03,182 WARN [JMSContainerInvoker] JMS provider failure detected for ListenBean
javax.jms.JMSSecurityException: MQJMS2013: invalid security authentication supplied for MQQueueManager
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2050)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1532)
at com.ibm.mq.jms.MQQueueConnection.(MQQueueConnection.java:150)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:185)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:112)
etc.
The Websphere MQ server is not local to my machine. It seems like I would have to supply a username / password to the MDB as soon as it establishes the "listening" connection on that queue, but I cannot figure out where in the deployment files to do this.
Any help would be appreciated, I have been stuck on this for days, let me know if I need to post more info/ complete stack trace.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077387#4077387
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4077387
18Â years, 8Â months
[Installation, Configuration & DEPLOYMENT] - Re: XML conf && EAR
by jc7442
Just to explain the context. I use maven2 to build and tests a complete application. It is fully automatic. Tests can be executed on a platform without having to install or configure third party products (except in some cases the database)
I have several app that all uses a jboss AS with a default config/customiezation for my organization.
In my build process, I install this JBoss AS and then I deploy my config file and my ear. I do not want to overwritte files of my Jboss install. So that when I upgrade the jboss AS, I do not have to check copy/paste file (since there is none).
I just want to deploy all MBean required by my application in their own config file. That's why I do not want to modify login-config.xml file.
I have used ${jboss.home.url}. Now that it works fine
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077381#4077381
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4077381
18Â years, 8Â months