[EJB 3.0] - Problem with FetchType.EAGER - multiple instances of an obje
by reubenf
I have a class named Item that contains a list of objects of type Algorithm. The list is defined with the following property and mapping:
@ManyToMany(cascade=CascadeType.ALL, fetch=FetchType.EAGER, targetEntity=Algorithm.class)
@JoinTable(
name="item_algorithms",
joinColumns = { @JoinColumn( name="item_id") },
inverseJoinColumns = @JoinColumn( name="algorithm_id")
)
public List getAlgorithms() {
return algorithms;
}
I have a unit test that creates an Item with three Algorithms and then retrieves the Item with its Identifier
List itemIDs = new ArrayList(1);
itemIDs.add("testID");
Criteria criteria = session.createCriteria(Item.class);
criteria.add(Restrictions.in("itemIdentifier", idValues));
List entities = criteria.list();
System.out.println(entities.size());
With fetch=FetchType.EAGER - the returned list has 3 items
With fetch=FetchType.LAZY - the returned list has 1 item
The retrieved list should return only 1 item. The result should not be different based on the fetch strategy. It looks as if the query in the EAGER case does an outer join yielding 3 records and then creates 3 Items.
Can anyone please explain what I may be doing wrong?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985954#3985954
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985954
19Â years, 8Â months
[Security & JAAS/JBoss] - Re: Logout Issue
by sohil.shahï¼ jboss.com
Looks like you are performing all the right steps. Not sure at this point what the issue could possibly be with two logouts....its the same logic executed on both cases.
Just to make sure your configuration is right. Is this the way its setup
1/ context.xml in application A points to the logout URL of application A and not of B
2/ context.xml in application B points to the logout URL of application B and not of A.
here is what my logout.jsp looks like in the demo app
| <%@page contentType="text/html" language="java"%>
| <%
| response.setHeader("Cache-Control", "no-cache, must-revalidate");
| response.setHeader("Pragma","no-cache");
| %>
|
| <%
| request.getSession().invalidate();
| response.sendRedirect("index.jsp");
| %>
|
|
btw- is there any way for you to capture the http traffic being sent to the web server when following these steps....this will give more visibility into the sequence of steps being performed
Thanks
Sohil
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985953#3985953
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985953
19Â years, 8Â months
[JBoss jBPM] - Re: Error Messages when using command create.db
by wackruochen
I added this to my hibernate.cfg.xml file and
create.db.hibernate.properties file
| <property name="hibernate.jdbc.use_get_generated_keys">false</property>
|
| and
|
| hibernate.jdbc.use_get_generated_keys = false
|
but the error messages still there, but looks different.
I noticed the inserting command, the last column of the values is "default", it seems not right to me, it should be an integer number, right?
| [loadidentities] loading identities from C:\jbpm-3.1.2/src/resources/db2/identit
| y.db.xml ...
| [loadidentities] Hibernate: insert into JBPM_ID_USER (NAME_, EMAIL_, PASSWORD_,
| CLASS_, ID_) values (?, ?, ?, 'U', default)
| [loadidentities] Hibernate: insert into JBPM_ID_GROUP (NAME_, TYPE_, PARENT_, CL
| ASS_, ID_) values (?, ?, ?, 'G', default)
| [loadidentities] ****e is org.hibernate.exception.GenericJDBCException: could not insert: [org.jbpm.identity.Group]
| [loadidentities] org.jbpm.persistence.JbpmPersistenceException: couldn't commit
| hibernate session
| [loadidentities] at org.jbpm.persistence.db.DbPersistenceService.close(Db
| PersistenceService.java:189)
| [loadidentities] at org.jbpm.svc.Services.close(Services.java:211)
| [loadidentities] at org.jbpm.JbpmContext.close(JbpmContext.java:139)
| [loadidentities] at org.jbpm.identity.ant.LoadIdentitiesTask.execute(Load
| IdentitiesTask.java:67)
| [loadidentities] at org.apache.tools.ant.UnknownElement.execute(UnknownEl
| ement.java:275)
| [loadidentities] at org.apache.tools.ant.Task.perform(Task.java:364)
| [loadidentities] at org.apache.tools.ant.Target.execute(Target.java:341)
| [loadidentities] at org.apache.tools.ant.Target.performTasks(Target.java:
| 369)
| [loadidentities] at org.apache.tools.ant.Project.executeSortedTargets(Pro
| ject.java:1216)
| [loadidentities] at org.apache.tools.ant.Project.executeTarget(Project.ja
| va:1185)
| [loadidentities] at org.apache.tools.ant.helper.DefaultExecutor.executeTa
| rgets(DefaultExecutor.java:40)
| [loadidentities] at org.apache.tools.ant.Project.executeTargets(Project.j
| ava:1068)
| [loadidentities] at org.apache.tools.ant.Main.runBuild(Main.java:668)
| [loadidentities] at org.apache.tools.ant.Main.startAnt(Main.java:187)
| [loadidentities] at org.apache.tools.ant.launch.Launcher.run(Launcher.jav
| a:246)
| [loadidentities] at org.apache.tools.ant.launch.Launcher.main(Launcher.ja
| va:67)
| [loadidentities] Caused by: org.hibernate.exception.GenericJDBCException: could
| not insert: [org.jbpm.identity.Group]
| [loadidentities] at org.hibernate.exception.SQLStateConverter.handledNonS
| pecificException(SQLStateConverter.java:91)
| [loadidentities] at org.hibernate.exception.SQLStateConverter.convert(SQL
| StateConverter.java:79)
| [loadidentities] at org.hibernate.exception.JDBCExceptionHelper.convert(J
| DBCExceptionHelper.java:43)
| [loadidentities] at org.hibernate.persister.entity.AbstractEntityPersiste
| r.insert(AbstractEntityPersister.java:1986)
| [loadidentities] at org.hibernate.persister.entity.AbstractEntityPersiste
| r.insert(AbstractEntityPersister.java:2405)
| [loadidentities] at org.hibernate.action.EntityIdentityInsertAction.execu
| te(EntityIdentityInsertAction.java:37)
| [loadidentities] at org.hibernate.engine.ActionQueue.execute(ActionQueue.
| java:243)
| [loadidentities] at org.hibernate.event.def.AbstractSaveEventListener.per
| formSaveOrReplicate(AbstractSaveEventListener.java:269)
| [loadidentities] at org.hibernate.event.def.AbstractSaveEventListener.per
| formSave(AbstractSaveEventListener.java:167)
| [loadidentities] at org.hibernate.event.def.AbstractSaveEventListener.sav
| eWithGeneratedId(AbstractSaveEventListener.java:101)
| [loadidentities] at org.hibernate.event.def.DefaultSaveOrUpdateEventListe
| ner.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
| [loadidentities] at org.hibernate.event.def.DefaultSaveOrUpdateEventListe
| ner.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175)
| [loadidentities] at org.hibernate.event.def.DefaultSaveOrUpdateEventListe
| ner.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:98)
| [loadidentities] at org.hibernate.event.def.DefaultSaveOrUpdateEventListe
| ner.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
| [loadidentities] at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(Sessi
| onImpl.java:520)
| [loadidentities] at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionIm
| pl.java:513)
| [loadidentities] at org.hibernate.engine.CascadingAction$1.cascade(Cascad
| ingAction.java:134)
| [loadidentities] at org.hibernate.engine.Cascade.cascadeToOne(Cascade.jav
| a:213)
| [loadidentities] at org.hibernate.engine.Cascade.cascadeAssociation(Casca
| de.java:157)
| [loadidentities] at org.hibernate.engine.Cascade.cascadeProperty(Cascade.
| java:108)
| [loadidentities] at org.hibernate.engine.Cascade.cascade(Cascade.java:248
| )
| [loadidentities] at org.hibernate.event.def.AbstractSaveEventListener.cas
| cadeBeforeSave(AbstractSaveEventListener.java:385)
| [loadidentities] at org.hibernate.event.def.AbstractSaveEventListener.per
| formSaveOrReplicate(AbstractSaveEventListener.java:242)
| [loadidentities] at org.hibernate.event.def.AbstractSaveEventListener.per
| formSave(AbstractSaveEventListener.java:167)
| [loadidentities] at org.hibernate.event.def.AbstractSaveEventListener.sav
| eWithGeneratedId(AbstractSaveEventListener.java:101)
| [loadidentities] at org.hibernate.event.def.DefaultSaveOrUpdateEventListe
| ner.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
| [loadidentities] at org.hibernate.event.def.DefaultSaveOrUpdateEventListe
| ner.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175)
| [loadidentities] at org.hibernate.event.def.DefaultSaveOrUpdateEventListe
| ner.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:98)
| [loadidentities] at org.hibernate.event.def.DefaultSaveOrUpdateEventListe
| ner.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
| [loadidentities] at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(Sessi
| onImpl.java:520)
| [loadidentities] at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionIm
| pl.java:513)
| [loadidentities] at org.hibernate.engine.CascadingAction$1.cascade(Cascad
| ingAction.java:134)
| [loadidentities] at org.hibernate.engine.Cascade.cascadeToOne(Cascade.jav
| a:213)
| [loadidentities] at org.hibernate.engine.Cascade.cascadeAssociation(Casca
| de.java:157)
| [loadidentities] at org.hibernate.engine.Cascade.cascadeProperty(Cascade.
| java:108)
| [loadidentities] at org.hibernate.engine.Cascade.cascadeCollectionElement
| s(Cascade.java:290)
| [loadidentities] at org.hibernate.engine.Cascade.cascadeCollection(Cascad
| e.java:185)
| [loadidentities] at org.hibernate.engine.Cascade.cascadeAssociation(Casca
| de.java:160)
| [loadidentities] at org.hibernate.engine.Cascade.cascadeProperty(Cascade.
| java:108)
| [loadidentities] at org.hibernate.engine.Cascade.cascade(Cascade.java:248
| )
| [loadidentities] at org.hibernate.event.def.AbstractFlushingEventListener
| .cascadeOnFlush(AbstractFlushingEventListener.java:130)
| [loadidentities] at org.hibernate.event.def.AbstractFlushingEventListener
| .prepareEntityFlushes(AbstractFlushingEventListener.java:121)
| [loadidentities] at org.hibernate.event.def.AbstractFlushingEventListener
| .flushEverythingToExecutions(AbstractFlushingEventListener.java:65)
| [loadidentities] at org.hibernate.event.def.DefaultFlushEventListener.onF
| lush(DefaultFlushEventListener.java:26)
| [loadidentities] at org.hibernate.impl.SessionImpl.flush(SessionImpl.java
| :980)
| [loadidentities] at org.hibernate.impl.SessionImpl.managedFlush(SessionIm
| pl.java:353)
| [loadidentities] at org.hibernate.transaction.JDBCTransaction.commit(JDBC
| Transaction.java:106)
| [loadidentities] at org.jbpm.persistence.db.DbPersistenceService.close(Db
| PersistenceService.java:177)
| [loadidentities] ... 15 more
| [loadidentities] Caused by: java.sql.SQLException: [SQL7008] JBPM_00008 in jbpm not valid for operation.
| [loadidentities] at com.ibm.as400.access.JDError.throwSQLException(JDErro
| r.java:650)
| [loadidentities] at com.ibm.as400.access.JDError.throwSQLException(JDErro
| r.java:621)
| [loadidentities] at com.ibm.as400.access.AS400JDBCStatement.commonExecute
| (AS400JDBCStatement.java:884)
| [loadidentities] at com.ibm.as400.access.AS400JDBCPreparedStatement.execu
| teUpdate(AS400JDBCPreparedStatement.java:1144)
| [loadidentities] at org.hibernate.persister.entity.AbstractEntityPersiste
| r.insert(AbstractEntityPersister.java:1976)
| [loadidentities] ... 59 more
|
| BUILD FAILED
| C:\jbpm-3.1.2\build.deploy.xml:51: org.jbpm.JbpmException: problem closing servi
| ces {persistence=org.jbpm.persistence.JbpmPersistenceException: couldn't commit
| hibernate session}
|
thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985952#3985952
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985952
19Â years, 8Â months
[JBoss Seam] - Seam cannot find component
by arnieAustin
I have a seam component (it is not an Entity since there is no table related to it in this application) that at run time cannot be located for some reason. I've included the errors from the log below. The User class is used in the UserLogin/UserLoginAction class, populated via the userLogin.xhtml file. I just don't see what's wrong here.
| package us.tx.state.oag.DPSLicenseInquiry.business;
|
| import org.hibernate.validator.Length;
| import org.hibernate.validator.NotNull;
| import org.jboss.seam.ScopeType;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.Scope;
|
| import us.tx.state.oag.OagIdVault.OagIdVaultAccount;
| import us.tx.state.oag.DPSLicenseInquiry.business.User;
|
| @Name("user")
| @Scope(ScopeType.SESSION)
| public class User {
| private String cs_user_login = null;
| private String cs_user_password = null;
| private OagIdVaultAccount oagIdVaultAccount = null;
| public User () {}
|
| @NotNull @Length(min=2)
| public void setUserLogin(String ps_value) {
| cs_user_login = ps_value;
| }
| @NotNull
| public String getUserLogin() {
| return cs_user_login;
| }
| @NotNull @Length(min=5)
| public void setUserPassword(String ps_value) {
| cs_user_password = ps_value;
| }
| public String getUserPassword() {
| return cs_user_password;
| }
|
| public void setOagIdVaultAccount(OagIdVaultAccount po_account) {
| oagIdVaultAccount = new OagIdVaultAccount(po_account);
| }
| }
|
The error is:
| 2006-11-14 15:49:13,250 DEBUG [org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener] beginning transaction prior to phase: RESTORE_VIEW(1)
| 2006-11-14 15:49:13,250 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 2006-11-14 15:49:13,250 DEBUG [org.jboss.seam.contexts.Lifecycle] >>> Begin web request
| 2006-11-14 15:49:13,281 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.manager
| 2006-11-14 15:49:13,281 DEBUG [org.jboss.seam.core.Manager] No stored conversation
| 2006-11-14 15:49:13,281 DEBUG [org.jboss.seam.contexts.Contexts] found in application context: org.jboss.seam.core.init
| 2006-11-14 15:49:13,281 DEBUG [org.jboss.seam.jsf.AbstractSeamPhaseListener] After restoring conversation context: ConversationContext(2)
| 2006-11-14 15:49:13,296 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: user
| 2006-11-14 15:49:13,296 DEBUG [org.jboss.seam.Component] seam component not found: user
| 2006-11-14 15:49:13,296 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] could not resolve name
| 2006-11-14 15:49:13,343 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: user
| 2006-11-14 15:49:13,343 DEBUG [org.jboss.seam.Component] seam component not found: user
| 2006-11-14 15:49:13,343 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] could not resolve name
| 2006-11-14 15:49:13,343 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 2006-11-14 15:49:13,343 DEBUG [org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener] committing transaction after phase: PROCESS_VALIDATIONS(3)
| 2006-11-14 15:49:13,343 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 2006-11-14 15:49:13,343 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 2006-11-14 15:49:13,343 DEBUG [org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener] beginning transaction prior to phase: RENDER_RESPONSE(6)
| 2006-11-14 15:49:13,343 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 2006-11-14 15:49:13,343 DEBUG [org.jboss.seam.Component] instantiating Seam component: facesMessages
| 2006-11-14 15:49:13,359 DEBUG [org.jboss.seam.core.Manager] Discarding conversation state: 2
| 2006-11-14 15:49:13,359 DEBUG [org.jboss.seam.contexts.Lifecycle] flushing page context
| 2006-11-14 15:49:13,375 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 2006-11-14 15:49:13,375 DEBUG [org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener] committing transaction after phase: RENDER_RESPONSE(6)
| 2006-11-14 15:49:13,375 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 2006-11-14 15:49:13,375 DEBUG [org.jboss.seam.contexts.Lifecycle] After render response, destroying contexts
| 2006-11-14 15:49:13,375 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying event context
| 2006-11-14 15:49:13,375 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.core.manager
| 2006-11-14 15:49:13,375 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.apache.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW
| 2006-11-14 15:49:13,375 DEBUG [org.jboss.seam.contexts.Contexts] destroying: com.sun.facelets.legacy.ELCONTEXT
| 2006-11-14 15:49:13,375 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying conversation context
| 2006-11-14 15:49:13,375 DEBUG [org.jboss.seam.contexts.Contexts] destroying: facesMessages
| 2006-11-14 15:49:13,375 DEBUG [org.jboss.seam.contexts.Lifecycle] flushing server-side conversation context
| 2006-11-14 15:49:13,375 DEBUG [org.jboss.seam.contexts.Lifecycle] <<< End web request
| 2006-11-14 15:49:13,375 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
|
| package us.tx.state.oag.DPSLicenseInquiry.business;
|
| import java.io.Serializable;
|
| import javax.ejb.Remove;
| import javax.ejb.Stateful;
| import javax.faces.application.Application;
| import javax.faces.component.UIMessage;
| import javax.faces.context.FacesContext;
| import javax.persistence.EntityManager;
| import javax.persistence.PersistenceContext;
|
| import org.jboss.seam.annotations.Create;
| import org.jboss.seam.annotations.In;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.Out;
| import org.jboss.seam.annotations.Scope;
| import org.jboss.seam.annotations.Destroy;
| import org.jboss.seam.ScopeType;
|
| import us.tx.state.oag.DPSLicenseInquiry.business.User;
| import us.tx.state.oag.DPSLicenseInquiry.business.DpsLicenseInquiryConstants;
|
| import us.tx.state.oag.OagIdVault.OagIdVault;
| import us.tx.state.oag.OagIdVault.OagIdVaultAccount;
|
| @Stateful
| @Name("UserLogin")
| @Scope(ScopeType.CONVERSATION)
| public class UserLoginAction implements UserLogin {
| @In(create=true, required=true)
| @Out
| private User user;
|
| //seam-gen method
| public String doAction() {
| FacesContext facesContext = FacesContext.getCurrentInstance();
| Application application = facesContext.getApplication();
| String ls_result = null;
|
| // check to see that the user object above has been created and passed in
| if ( user == null ) {
| System.out.println("No user object passed in!");
| return ls_result;
| } else {
| System.out.println("User object to find: " + user.getUserLogin());
| }
|
|
| OagIdVault userVault = new OagIdVault();
| if ( userVault.connectDefaults() == false ) {
| System.out.println("Unable to connect to LDAP server.");
| return ls_result;
| }
| OagIdVaultAccount lo_user = null;
| lo_user = userVault.authenticateUser(user.getUserLogin(), user.getUserPassword());
| if ( lo_user != null ) {
| // fake out security
| //lo_user.addToGroup(DpsLicenseInquiryConstants.CS_DPS_LI_Security_Group);
|
| // determine if the user is a member of the group
| if ( lo_user.findGroupName(DpsLicenseInquiryConstants.CS_DPS_LI_Security_Group) ) {
| ls_result = "success";
| } else {
| /*
| UIMessage msg = (UIMessage)application.createComponent("javax.faces.HtmlMessage");
| msg.getAttributes().put("for", "username");
| msg.set*/
| ls_result = "failure";
| }
| }
| userVault.disconnect();
|
| return ls_result;
| }
|
| @Remove @Destroy
| public void destroy() {}
| }
|
XHTML FILE
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <html xmlns="http://www.w3.org/1999/xhtml"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:f="http://java.sun.com/jsf"
| xmlns:h="http://java.sun.com/jsf/html">
| <head>
| <f:loadBundle basename="messages" var="msgs" />
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
| <title>OAG / DPS License Inquiry</title>
| <link href="stylesheet/theme.css" rel="stylesheet" type="text/css" />
| </head>
| <body>
| <div id="pgHeader">
| <img src="images/banner.jpg" alt="OAG Banner" width="800px"/>
| </div>
| <div id="pgHeaderText">Office of the Attorney General</div>
|
| <div class="pgHorizSpace" style="color: white;">DPS License Search</div>
|
| <div class="pgAttention">
| <p class="error"><b>*** WARNING ***</b></p>
| <p class="warning">The information queried by this system has been provided by the DPS<br></br>
| with the understanding that it will not be abused or released.<br></br>
| Your access is conditional on the information contained herein remaining <b>Private</b>
| and <b>Privileged</b>.<br></br><br></br>
| Every query is logged by User Id. Printing of this data is <b>Strongly Discouraged</b>.<br></br>
| <br></br>
| </p>
| </div>
|
| <div class="pgHorizSpace"> </div>
|
| <div id="pgMessages">
| <h:messages globalOnly="true"/>
| </div>
|
| <div id="pgContent">
| <h:form>
| <fieldset>
| <legend>Enter your User Credentials</legend>
| <table class="formInput">
| <tr><td> </td></tr>
| <tr><td class="formLabelColumn">User Login:</td>
| <td class="formSpacerColumn"> </td>
| <td class="formFieldColumn"><h:inputText id="username" value="#{user.userLogin}"/></td>
| </tr>
| <tr><td class="formLabelColumn"> </td>
| <td class="formSpacerColumn"> </td>
| <td class="formFieldColumn"><h:message for="username"/></td></tr>
|
| <tr><td class="formLabelColumn">Password:</td>
| <td class="formSpacerColumn"> </td>
| <td class="formFieldColumn"><h:inputSecret id="password" value="#{user.userPassword}"/></td>
| </tr>
|
| <tr><td> </td></tr>
| <tr><td class="formLabelColumn"> </td>
| <td class="formSpacerColumn"> </td>
| <td class="formFieldColumn"><h:commandButton action="#{UserLogin.doAction}" value="Login" class="button" /></td>
| </tr>
| <tr><td> </td></tr>
| </table>
| </fieldset>
| </h:form>
| </div>
| <div class="pgHorizSpace"> </div>
| <div id="pgFooter">
| <p>This is some footer text</p>
| <p class="copyright">© 2006 Office of the Attorney General</p>
| </div>
| </body>
| </html>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985950#3985950
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985950
19Â years, 8Â months
[Security & JAAS/JBoss] - Re: Logout Issue
by nipunbatra
Hi Sohil
Thanks for your response
I cross checked it twice and started fresh after deleting all the cookies, here is what I found out about cookies
1) Application after I log in I can see one cookie for my domain "token"
2) Now from same browser I go to Applicatiob B, automatically gets log into the Application B and cookie is still "token" for my domain
3)I logout from application B and after that "token" cookie is deleted under the domain.
4)I go back to application A and again I automatically log in and this time I again see the "token" cookie for my domain
5)I go back to Application B and again I gets logged in automatically, token cookie is regenerated
Note: All above steps are done with 5 sec delay
Now
6) On Application B I logout (In logs I can see I am calling session.invalidate() and after that request.getuserprincipal becomes null),
After logging out,Now token cookie is deleted from browser. I again type the logout URL on browser for application B and send the page again to logout page i.e I did logout for 2 times
7) Now I go back to Application A and now I see 'SSO Logout...' message on screen, (I beleive that this message is internal as I am not printing it anywhere) and after that my logout page of application A is called.
So I am sure that I have to do logout twice and then only I log out from all partner applications.
Waiting for your response
Regards
Nipun
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985947#3985947
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985947
19Â years, 8Â months