[JBoss Seam] - Conversation ends on its own
by vikramchhetryy
Hi All,
I am trying to edit User details in a very unorthodox manner, I dont know if this is cause for Conversation problem.
My Code:-
| public class CallCenterAgentEditAction implements CallCenterAgentEdit {
|
| @Logger
| private Log log;
|
| @PersistenceContext
| private EntityManager entityManager;
|
| @Out(required = false)
| Person person;
| @Out(required = false)
| Account account;
| @Out(required = false)
| PersonContactDetail personContactDetail;
| @Out(required = false)
| Roles roles;
|
| @In
| FacesMessages facesMessages;
|
| public String prevSelectedCallCenterAgentDetails() {
| log.info("Inside editSelectedCallCenterAgentDetails method ");
|
| log.info("Exiting editSelectedCallCenterAgentDetails method");
| return "callCenterAgentEditPrev.xhtml";
| }
|
| @Begin
| public void getSelectedCallCenterAgentDetails(Account acc) {
| log.info("Inside getSelectedCallCenterAgentDetails method");
|
| int personId = acc.getPerson().getIpersonId();
|
| person = (Person) entityManager.createQuery(
| "from Person p " + "where " + "p.ipersonId = :personId ")
| .setParameter("personId", personId).getSingleResult();
|
| personContactDetail = (PersonContactDetail) entityManager.createQuery(
| "from PersonContactDetail p " + "where "
| + "p.person.ipersonId = :personId ").setParameter(
| "personId", personId).getSingleResult();
|
| int roleId = (Integer) entityManager.createQuery(
| "select pr.roles.iroleId from PersonRoles pr " + "where "
| + "pr.person.ipersonId = :personId ").setParameter(
| "personId", personId).getSingleResult();
|
| roles = new Roles();
| roles.setIroleId(roleId);
| account = acc;
| log.info("Exiting getSelectedCallCenterAgentDetails method");
| }
|
| @End
| public void updateCallCenterAgentDetails() {
| log.info("Inside updateCallCenterAgentDetails method");
| CallCenterAgent callCenterAgent = new CallCenterAgent();
| PersonRoles personRoles = new PersonRoles();
| Date date = new Date();
| log.info("After Creating object");
| person.setDtUpdated(date);
| account.setDtUpdated(date);
| personContactDetail.setDtUpdated(date);
|
| callCenterAgent.setIcallCenterAgentId(person.getIpersonId());
| callCenterAgent.setDtUpdated(date);
|
| personRoles.getPerson().setIpersonId(person.getIpersonId());
| personRoles.getPerson().setIpersonId(person.getIpersonId());
| personRoles.getRoles().setIroleId(roles.getIroleId());
|
| log.info("Updating the database");
| entityManager.merge(person);
| entityManager.merge(account);
| entityManager.merge(personContactDetail);
| entityManager.merge(personRoles);
| entityManager.merge(callCenterAgent);
| facesMessages.add("Successfully updated the Agent");
| log.info("Exiting updateCallCenterAgentDetails method");
| }
|
| @Remove
| public void destroy() {
| }
|
| public String editAgentMoveBack() {
| return "/callCenterAgentAdd.xhtml";
| }
|
| @End
| public void cancel() {
| }
|
| }
|
<page view-id="/callCenterAgentManage.xhtml" login-required="true">
| <navigation from-action="#{callCenterAgentEdit.getSelectedCallCenterAgentDetails(details)}">
| <redirect view-id="/callCenterAgentEdit.xhtml" />
| </navigation>
|
| <navigation from-action="#{callCenterAgentManage.updateCallCenterAgentDetails}">
| <redirect view-id="/callCenterAgentManage.xhtml" />
| </navigation>
|
| <navigation from-action="#{callCenterAgentManage.cancel}">
| <redirect view-id="/callCenterAgentManage.xhtml" />
| </navigation>
|
| </page>
|
edit xhtml
| <s:decorate id="fNameDecoration" template="layout/edit.xhtml">
| <ui:define name="label">First Name</ui:define>
| <h:inputText id="fName" required="true"
| value="#{person.strFirstName}">
| <a:support event="onblur" reRender="fNameDecoration" />
| </h:inputText>
| </s:decorate>
|
when i try to change the details the conversation ends and after some time when I see the server logs it says multiple threads running and the screen hangs.
Can anyone help me get througn this?
Any help would be appreciated.
-Vikram
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118929#4118929
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118929
18 years, 3 months
[EJB 3.0] - Re: Accessing EJB3s through a firewall
by magnus.ahlander
Thanks for your advice.
Actually I have a working configuration, but with the inconvenience of having to configure remote bindings in the jboss.xml file of my EAR for all beans I want to remotely access:
<session>
| <ejb-name>TestBean</ejb-name>
| <remote-binding>
| <client-bind-url>socket://<external_host_name>:3873</client-bind-url>
| </remote-binding>
| </session>
|
This is inconvenient because developers don't necessarily know where the EAR is going to be deployed at build time. The application deployer is therefore forced to make configurations within the EAR before deploy.
I wonder if setting -Djava.rmi.server.useLocalHostname=true has any effect if having set -Djava.rmi.server.hostname=<external_host_name>? Seems like no according to
http://manuales.gfc.edu.co/java/manual/guide/rmi/faq.html#nethostname
My configuration:
* JBossAS 4.2.1 GA
* Using -Djava.rmi.server.hostname=<external_host_name> when starting JBossAS
* Using -b 0.0.0.0 when starting JBossAS
* Entry <internal_ip> <external_host_name> in C:\Windows\System32\drivers\etc\hosts
* Remote binding in jboss.xml for all beans remotely accessed <remote-binding>
| <client-bind-url>socket://<external_host_name>:3873</client-bind-url>
| </remote-binding>
|
Regards,
Magnus
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118922#4118922
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118922
18 years, 3 months
[JBoss Seam] - Trouble connecting to built-in HSQL using SQuirreL
by siegfried@heintze.com
I'm following the instructions at http://wiki.jboss.org/wiki/Wiki.jsp?page=NukesUsingHSQLDB to connect to the interal HSQL built-into JBoss. I want to see the results of my interaction with the web interface.
I'm running the initial helloworld application from "JBoss Seam" by Yuan and Heute.
When I try to connect to the internal HSQL database using SQirreL, I get "JBoss: socket creation error".
What am I doing wrong?
Thanks,
Siegfried
| ava.sql.SQLException: socket creation error
| at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
| at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)
| at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
| at org.hsqldb.jdbcDriver.connect(Unknown Source)
| at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:133)
| at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.execute(OpenConnectionCommand.java:97)
| at net.sourceforge.squirrel_sql.client.mainframe.action.ConnectToAliasCommand$SheetHandler.run(ConnectToAliasCommand.java:279)
| at net.sourceforge.squirrel_sql.fw.util.TaskExecuter.run(TaskExecuter.java:82)
| at java.lang.Thread.run(Thread.java:619)
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118919#4118919
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118919
18 years, 3 months
[JBoss jBPM] - JBPM-3.2.2 Migrated to Oracle 10g, Hibernate_Sequence is acce
by soumya_in
Hi All,
I have migrated JBPM in Oracle 10g but I have encountered a problem regarding Hibernate_sequence that has been provided with the given Oracle script.
Actually when my JBPM was associated with Hypersonic after each deployment the Process_ID is getting increased evenly and with an interval of 1. e.g Process A if I deploy it gets it's ID as 1,then the next process deployed get it's ID 2 and so on.....But in Oracle,the scenario is completely uneven.
I changed the hibenate.cfg.xml and made the following changes......Uncomment the following section
<property name="hibernate.show_sql">true</property>
| <property name="hibernate.format_sql">true</property>
| <property name="hibernate.use_sql_comments">true</property>
Then I found that due to dependency of different tables and as the single sequence is being used by every table,sequence is accessed globally and that's why this strange behaviour is reflected in Oracle.
As compared to Hypersonic,It doesn't follow the SQL-200n standard.Sequence never accessed globally even same sequence is accessed by different table.
To eradicarte the problem what may be the possible solution?????
Any comment and suggestion is most welcome
Thanks
Soumya
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118914#4118914
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118914
18 years, 3 months