[JBoss Seam] - Re: Changing Seam component properties via Remoting
by dkane
There is a lot of code, so only key points :
Seam Component interface :
@Local
| public interface MapImageA4J
| {
| public void setXc(int xc);
| public int getXc();
| public void setYc(int yc);
| public int getYc();
| public void setWidth(int width);
| public int getWidth();
| public void setHeight(int height);
| public int getHeight();
| public void setScale(int scale);
| public int getScale();
| public void drawImage(OutputStream out, Object data) throws Exception;
|
| @WebRemote
| public void zoom(double xPercent, double yPercent, double widthPercent, double heightPercent);
|
| // this method is being called via Remoting and changes values of properties xc, yc, scale, etc.
|
|
| public void left();
| public void right();
| public void up();
| public void down();
| public void zoomIn();
| public void zoomOut();
| public void destroy();
| }
|
Web - page fragment :
|
| <s:link action="#{map.left}" value="left"/><br/>
| <s:link action="#{map.right}" value="right"/><br/>
| <s:link action="#{map.up}" value="top"/><br/>
| <s:link action="#{map.down}" value="bottom"/><br/>
| <s:link action="#{map.zoomIn}" value="zoom in"/><br/>
| <s:link action="#{map.zoomOut}" value="zoom out"/><br/>
|
| <!-- links above works fine and image is being rerendered -->
|
| <a4j:mediaOutput id="a4map"
| element="img"
| cacheable="false"
| session="true"
| createContent="#{map.drawImage}"
| mimeType="image/gif"
| onmousedown="mapStartZoom(event)"
| onmousemove="mapMouseMove(event)"
| onmouseup="mapMouseUp(event)"
| />
|
And, the problem point : end of "onmouseup" handler (Javascript):
function mapStopZoom(evt)
| {
| //... some calculation ...
|
| Seam.Component.getInstance("map").zoom(xLeftPercent,yTopPercent,widthPercent,heightPercent);
| }
|
zoom method is being called via Remoting, but when I click e.g. "up" or "down" after zoom results falls back.
I've raised the similar issue in ajax4jsf forum, because I beleive the problem is impossibility to rerender mediaOutput right after remoting call.
So far have not found a way to rerender a4j object from plain JavaScript.
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066643#4066643
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066658#4066658
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066658
18Â years, 9Â months
[JCA/JBoss] - Re: Message DB + Oracle database connection count problems
by sks4jboss
Hi Adrian,
Thanks for the update.
We do have EJBs and at runtime we do also hit the database through them (But this shouldn't be at a high TPS).
Below is the stack trace for the failure through EJB. What we do is just a read from the database.
anonymous wrote :
| 19:39:12,435 ERROR [BeanLock] Saw rolled back tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=cmp2app01/47048457, BranchQual=, localId=47048457]
| 19:39:12,438 ERROR [LogInterceptor] TransactionRolledbackLocalException in method: public abstract com.mobilgw.sam.definition.cp.CPDetailsDef com.mobilgw.sam.definition.cp.CPDetailsDefLocalRemote.getData(), causedBy:
| java.lang.RuntimeException: Transaction marked for rollback, possibly a timeout
| at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.doSchedule(QueuedPessimisticEJBLock.java:228)
| at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.schedule(QueuedPessimisticEJBLock.java:183)
| at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:85)
| at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:53)
| at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
| at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
| at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
| at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:139)
| at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
| at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:514)
| at org.jboss.ejb.Container.invoke(Container.java:873)
| at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:413)
| at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:50)
| at $Proxy288.getData(Unknown Source)
| at com.mobilgw.sam.common.WFComponentFactory.getCPDetailsForShortName(WFComponentFactory.java:4927)
| ..................
| at com.mobilgw.rmi.ListenerThread.run(ListenerThread.java:128)
| 19:39:12.442:000000000:F:sam.common.WFComponentFactory.getCPDetailsForShortName:WFComponentFactory.java(4937):Unique Constraint check fail javax.ejb.TransactionRolledbackLocalException: Transaction marked for rollback, possibly a timeout; CausedByException is:
| Transaction marked for rollback, possibly a timeout
|
Below stack trace is for pretty stable code (tested at a TPS of over 600 and already reviewed again for closing of connections.)
anonymous wrote :
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:103)
| at com.mobilgw.sam.common.cp.celcom.WFCelcomComponentFactory.(WFCelcomComponentFactory.java:120)
| at com.mobilgw.sam.plugin.celcom.CheckAllowBlacklist.checkSubscriberForAllowBlackList(CheckAllowBlacklist.java:159)
| at com.mobilgw.sam.plugin.celcom.CheckAllowBlacklist.execute(CheckAllowBlacklist.java:80)
| at com.mobilgw.sam.executionengine.adapter.JavaAdapterHandler.execute(JavaAdapterHandler.java:84)
| at com.mobilgw.sam.executionengine.ExecutionEngine.execute(ExecutionEngine.java:575)
| at com.mobilgw.sam.executionengine.ExecutionEngine.execute(ExecutionEngine.java:460)
| at com.mobilgw.sam.executionengine.ExecutionEngine.execute(ExecutionEngine.java:586)
| at com.mobilgw.sam.executionengine.ExecutionEngine.execute(ExecutionEngine.java:460)
| at com.mobilgw.sam.executionengine.ExecutionEngine.execute(ExecutionEngine.java:455)
| at com.mobilgw.sam.executionengine.ExecutionEngine.execute(ExecutionEngine.java:361)
| at com.mobilgw.sam.executionengine.queue.SmsService.run(SmsService.java:575)
| at java.lang.Thread.run(Thread.java:534)
|
Also we have observed that getting a queue receiver usually fails when we hit this kinda problem hits with DB. So was just thinking if it has some relation. Below is the error for queue receiver.
anonymous wrote :
| org.jboss.mq.SpyJMSException: Error creating connection to the database.; - nested throwable: (org.jboss.util.NestedSQLException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ); - nested throwable: (javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] )))
|
Thanks again,
Suds
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066651#4066651
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066651
18Â years, 9Â months
[Beginners Corner] - Parameter is not sent to my method from jsf
by olebilleï¼ gmail.com
Hi.
On my jsf page I have this.
<h:dataTable value="#{surveys}" id="surveys"
var="surveyxx"
styleClass="dvdtable"
headerClass="dvdtablehead"
rowClasses="results"
columnClasses="dvdtablecol">
<h:column>
<f:facet name="header">
<h:outputText value="navn" />
</f:facet>
<s:link value="#{surveyxx.name}" action="#{editSurvey.selectSurvey(surveyxx)}"/>
</h:column>
</h:dataTable>
in my pages.xml I have this.
<page view-id="/ManageSurveys/surveyList.xhtml" login-required="true">
<navigation from-action="#{editSurvey.selectSurvey(surveyxx)}">
<redirect view-id="/ManageSurveys/surveyElementsEdit.xhtml"/>
and my method looks like this
public void selectSurvey(Survey surveyxx)
{
survey = surveyxx;
}
My method is called allright but surveyxx is just null instead of containing the object from the list. What Im trying to achieve here is that when a user clicks an object on the list I want it put on session and then return to a page where I can edit content on the object.
Im new to jsf. So I might be making some dumb rookie mistake =)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066649#4066649
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066649
18Â years, 9Â months