Multiple Sessions in one Sessions.xml
Hi,
I need to connect to multiple database instances with two user name and password. I am creating two projects one each for one DB instance and I am using two session in the Sessions.xml. When I create server session for two sessions the second session is not logged in. When I try to create a ClientSession from the Second serversession I get an error like login before trying to get the session.
As a work arround after creating the second serversesion I say serversession.login() after which I didn't get any error. IS this the correct approach.
Regards
Solomon
If you are going to take this approach, then I would recommend taking an initialization step in which you use the getSession API that takes a Boolean for instructing TopLink whether to login the session or not. Set this to False so that TopLink does not login any of the sessions. Then you can log them in yourself without trying to log in an already logged in session.
--Gordon
Similar Messages
-
Transform multiple rows to one single xml
Hi!
How to get only one xml (10gR2)?
I found this example:
set long 32000
SELECT XMLELEMENT("EMP_TABLE",
(select XMLELEMENT("EMP_ROW",
XMLFOREST(empno, ename, job, mgr, hiredate, sal, deptno)
from emp
where empno = 7369))
from dual;
XMLELEMENT("EMP_TABLE",(SELECTXMLELEMENT("EMP_ROW",XMLFOREST(EMPNO,ENAME,JOB,MGR
<EMP_TABLE><EMP_ROW><EMPNO>7369</EMPNO><ENAME>SMITH</ENAME><JOB>CLERK</JOB><MGR>
7902</MGR><HIREDATE>1980-12-17</HIREDATE><SAL>800</SAL><DEPTNO>20</DEPTNO></EMP_
ROW></EMP_TABLE>
But what if I need a result without
"where empno = 7369" e.g. all rows?
Greetings
BjørnSQL> set long 32000
SQL> set pagesize 0
SQL> SELECT XMLELEMENT(
2 "EMP_TABLE",
3 (select xmlagg(xmlelement("EMP_ROW",
4 (xmlforest(empno as "empno"
5 ,ename as "ename"
6 ,job as "job"
7 ,mgr as "mgr"
8 ,sal as "sal"
9 ,deptno as "deptno")))) from emp)).extract('/').GetClobVal()
10 from dual
11 /
<EMP_TABLE>
<EMP_ROW>
<empno>7521</empno>
<ename>WARD</ename>
<job>SALESMAN</job>
<mgr>7698</mgr>
<sal>1251.25</sal>
<deptno>30</deptno>
</EMP_ROW>
<EMP_ROW>
<empno>7566</empno>
<ename>JONES</ename>
<job>MANAGER</job>
<mgr>7839</mgr>
<sal>2977.98</sal>
<deptno>20</deptno>
</EMP_ROW>
<EMP_ROW>
<empno>7654</empno>
<ename>MARTIN</ename>
<job>SALESMAN</job>
<mgr>7698</mgr>
<sal>1251.25</sal>
<deptno>30</deptno>
</EMP_ROW>
<EMP_ROW>
<empno>7698</empno>
<ename>BLAKE</ename>
<job>MANAGER</job>
<mgr>7839</mgr>
<sal>2852.85</sal>
<deptno>30</deptno>
</EMP_ROW>
<EMP_ROW>
<empno>7788</empno>
<ename>SCOTT</ename>
<job>ANALYST</job>
<mgr>7566</mgr>
<sal>3003</sal>
<deptno>20</deptno>
</EMP_ROW>
<EMP_ROW>
<empno>7839</empno>
<ename>KING</ename>
<job>PRESIDENT</job>
<sal>5005</sal>
<deptno>10</deptno>
</EMP_ROW>
<EMP_ROW>
<empno>7844</empno>
<ename>TURNER</ename>
<job>SALESMAN</job>
<mgr>7698</mgr>
<sal>1501.5</sal>
<deptno>30</deptno>
</EMP_ROW>
<EMP_ROW>
<empno>7876</empno>
<ename>ADAMS</ename>
<job>CLERK</job>
<mgr>7788</mgr>
<sal>1101.1</sal>
<deptno>20</deptno>
</EMP_ROW>
<EMP_ROW>
<empno>7900</empno>
<ename>JAMES</ename>
<job>CLERK</job>
<mgr>7698</mgr>
<sal>950.95</sal>
<deptno>30</deptno>
</EMP_ROW>
<EMP_ROW>
<empno>7934</empno>
<ename>MILLER</ename>
<job>CLERK</job>
<mgr>7782</mgr>
<sal>1301.3</sal>
<deptno>10</deptno>
</EMP_ROW>
</EMP_TABLE>
SQL>
SQL> spool off -
How to open multiple sessions for one user?
Sorry for the silly question but I couldn't find it googling or searching through this forum, so I started wondering whether it's possible in SQL Developer to open multiple sessions for one user. I'm fairly new to SQL Developer and databases in general.
When I open SQL Developer and connect to a schema, a worksheet opens named MYSCHEMA. If I disconnect then connect, another worksheet opens, named MYSCHEMA~1. I assumed these were different sessions, but if I enter into one worksheet:
select col1 from my_table where row_id = 1
-- shows result is 1
update my_table set col1 = 0 where row_id = 1
select col1 from my_table where row_id = 1
-- shows result is 0and then enter into the second worksheet:
select col1 from my_table where row_id = 1
-- shows result is 0I would have expected the second worksheet to report 1 because the first worksheet did not issue a COMMIT. Thus, I'd guess both worksheets are the same session? Is that right? If so, how do I have two sessions open simultaneously (opened by same user)?
I'm trying to implement the code at the bottom of this post, for which testing requires at least two sessions:
Re: Help with Procedure
Edited by: tem on Apr 18, 2012 6:44 AMThanks Jim,
Ctrl-Shift-N doesn't do anything for me. I'm on a mac -- by experimenting it looks like command-N does what you're looking for. This appears to be the same as left-clicking on the "New" icon in the top left corner of SQL Developer, or selecting from the pull-down menu, File > New.
This opens "Create a New" window that appears to be a wizard. What would I select at this point? Options are: Database Connection, Table, View, Package, ...
I don't see an option for "Worksheet".
UPDATE:
OK, I found that if I select "SQL File", a worksheet becomes available. Perhaps this is what you intended. However, when I issue the command
select col1 from my_table where row_id = 1;it still returns 0 instead of 1. Hmm, maybe my initial assumption was wrong -- if this is a second (e.g. different) session, should I expect the changes made in the first session in SQL Developer (the UPDATE command) WITHOUT a commit, to be observed in this second session? I thought that changes made in one session were not viewable in a different session until these changes are committed in the first session? If so, how to show this in SQL Developer? I must be missing something basic here.
Or, is SQL Developer issuing some sort of "auto-commit" without my knowledge?
Edited by: tem on Apr 18, 2012 8:00 AM -
In one sessions.xml file can i include more than one project
Hi Folks,
I got a requirement to create more projects by using the same sessions.xml file if it is possible please let me know.
thanks
Venkatram R. VeerareddyHi Venkatram,
It is possible to have more than one session in sessions.xml. Have the sessions.xml like this
<toplink-configuration>
<session>
<name>Session1</name>
</session>
<session>
<name>Session2</name>
</session>
</toplink-configuration>
Use session broker for handling both the sessions simultaneously. For more details see examples in toplink under directory broker. -
Can XSQL create multiple session variables using only one database call?
Right now if I want to set session variables for username and accesslevel, I code out like this:
<xsql:set-session-param name="name" bind-params="username password">
SELECT DISTINCT USERNAME
FROM LKUP_USER
WHERE USERNAME = ? AND PASSWORD = ? AND ACCESSLEVEL = 0
</xsql:set-session-param>
<xsql:set-session-param name="authlvl" bind-params="username password">
SELECT DISTINCT ACCESSLEVEL
FROM LKUP_USER
WHERE USERNAME = ? AND PASSWORD = ? AND ACCESSLEVEL = 0
</xsql:set-session-param>Is there any way to do it so that I don't have to do multiple queries to the database to set session variables? i.e., something like this:
<xsql:set-multiple-session-param name="user authlvl" bind-params="username password">
SELECT DISTINCT USERNAME,
ACCESSLEVEL
FROM LKUP_USER
WHERE USERNAME = ? AND PASSWORD = ? AND ACCESSLEVEL = 0
</xsql:set-multiple-session-param>Sort of like how bind-params works. Setting bind-params="username password" makes the first ? akin to username and the next ? akin to password.
Is this functionality already in existence?
Thanks!
Malik Graves-PryorNot currently possible to collapse into one request without doing it in a custom action handler.
A custom action handler can:
[list=1]
[*]Get the current JDBC connection from the XSQLPageRequest
[*]Get the SQL statement to perform using the function getActionElementContent
[*]Handle any bind parameters specified an a bind-params attribute on the action element by calling handleBindVariables()
[*]Execute and fetch the row from the query
[*]Check to see that the return value of getPageRequest().getRequestType() equals the value "Servlet"
[*]Cast the page request to an XSQLServletPageRequest and call getHttpServletRequest()
[*]Call getSession() on the request
[*]Set the session variables you want to
[*]Close the JDBC statement
[list]
will consider a built-in enhancement for a future XSQL release. -
How to avoid multiple session for the same username
I need suggestions on implementing single user login , like My system has a user with a username jdavid and my application should not allow two different sessions for the same username jdavid , can one session peep into all other session
to see if the any has a usernaem jdavid, I am basically looking for some pattern if any available for restricting multiple session for the same username . like jaas or any other security api provides this ?Store a Map<User, HttpSession> in application scope and let your application intercept on that. On login, just check if the User is already there, then get the associated HttpSession, invalidate it and replace it by the current HttpSession, else just store the current User-HttpSession pair in the map. On logout obviously remove the User-HttpSession pair from the map.
-
Multiple Sessions in CMC for the same user
Hello,
Version: BOE XI R2 SP3
A user opens an Xcelsius Dashboard. As they are using the dashboard, multiple calls are being made through QaaWS to the database. In CMC, we can see multiple sessions created for that user. However, this is not 100% consistent.
Why are there multiple sessions created for one user consuming one dashboard? Shouldn't everything result in one session?
Thank you,
ScottThank you Greg,
The user shows multiple session after opening and refreshing just one Xcelsius Dashboard over and over again. It is using QaaWS to get its data.
Also, as you mentioned, we are also seeing problems with Logout. Sometimes, users click the logout, but their session does not terminate. Other times, it does terminate. And, also, sometimes the logout button does not work. The user is forced to just close the browser window.
Any ideas?
Scott -
Multiple sessions in a single database connection.
I have copied the following text from Forms Developer2000
"At runtime, Form Builder automatically establishes and manages a single connection to ORACLE. By default, one user session is created for this connection. However, the multiple-sessioning feature of ORACLE allows a single client to establish multiple sessions within a single connection. ORACLE transaction-management and read-consistency features all are implemented at the session level, so creating multiple sessions allows a single user to have multiple, independent transactions."
If ORACLE allows a single client to establish multiple sessions within a single connection, I want to leverage on this feature in my application which uses BC4J.
Can anybody tell me if
1. its possible achieve this in Java(BC4J).
2. If Yes, How?
regards,
vikrantThank you for your valuable suggestion.
I believe createing multiple root Application
Modules, will create as many number of connections to
database, hence multiple transactions.
But What I wanted was multiple sessions in a single
connection, who's behavior will be similar to two
different connections.Could you tell me the advantage you're looking for in multiple sessions in one connection vs. multiple connections (where connections may be pooled)?
Thanks.
Sung -
How do I create a program with multiple sessions?
I need to allow multiple sessions with this program.
I realize that it involves threading of some sort, but I'm pretty new to this area and am not sure how I should go about this.
Here are the instructions:
"� Write an application that will create an online dictionary a data file will be supplied that contains a list of words and their meanings. The hash table will contain a key (the word in question) and a value (byte offset of the word meaning stored in a random access file). You will also provide methods for entering, searching and deleting words online. The program must allow for multiple sessions."
I have most of this all done, and have a dictionaryBroker ready to write the add, delete and search methods.
But what about the mutliple sessions?
I'm thinking that my hashTable and RandomAccessFile classes are both going to have to be singleton.
What I want is for multiple people to be able to run the program at the same time, but if one person adds or deletes a record, I want it to update instantly for everyone.
But it also needs to run smoothly for everyone using it.
Thanks for any help, I just need a little push in the right direction here to help get me going.Well here is the entire assignment:
 Write an interface for a hash table that satisfies the following criteria:
The hash table will contain a key (String) and a value (Object)
Allow for a specific load capacity, if the capacity is exceeded the table is rehashed. The rehash may be called independently
Must allow for maintaining the hash table (adding modifying etc) the key will not be changed
Must allow for retrieving information from the table
Must allow addition using a Map object or one key, value pair at a time
The addition using a Map and the rehash must be a two pass approach
� Implement the interface.
� Write a test routine to test all aspects of the interface. The test must calculate the efficiency of your hashing algorithm.
� Write an application that will create an online dictionary a data file will be supplied that contains a list of words and their meanings. The hash table will contain a key (the word in question) and a value (byte offset of the word meaning stored in a random access file). You will also provide methods for entering, searching and deleting words online. The program must allow for multiple sessions.
Submission
Submit your eclipse project or executable jar file through WebCT. An efficiency of 70% or better must be attained for the assignment to be graded.
I'm in Canada, not the US.
It says online dictionary, but I don't think we actually have to do that. I'm pretty sure I can just use a simple GUI to allow them access to the dictionary.
So, I'm assuming that I just have to make sure that if multiple people are trying to access it at the same time it needs to update at the same time or something. The hashtable was the main part of the assignment so this part shouldn't be too large. -
Setup for Discoverer to have multiple sessions opening in different browser
What is the setup for Discoverer or Windows 6 browser to have multiple discoverer sessions opening in different browser windows at the same time in Discoverer 10g Plus?
We have implemented Discoverer 10g Plus just to be used as an extract tool. We have some workbooks retrieving 200,000 or more rows from an Oracle database. It is taking 30 to 45 minutes to download. Some users are able to open multiple sessions in different browsers to download more then one worksheet at the time, but we have other users who get an error message that they can only open one session at the time. What is the setup to allow users to open more than one Discoverer session?Additional research in Metalink found the following:
Hdr: 7261918 10.2 USER_JAV 10.1.2.54.25 PRODID-964 PORTID-46
Abstract: ALLOW ABILITY TO LAUNCH TWO DISCOPLUS SESSIONS FROM SAME BROWSER CONNECTION PAGE
*** 07/17/08 07:31 am REQUEST TEXT ***
Please refer to bug 6656139. Need to get Discoverer Plus certified to
support launching two plus sessions from same browser connections page when
using SUN JRE 1.5/1.6 or higher.
As per bug 6656139 it appears to be JVM 1.5.x limitation, because same
actions work fine when using SUN JRE 1.4.2_xx.
*** 07/17/08 07:31 am BUSINESS NEED ***
Impossible to run reports against two different databases simultaniously
using same Discoverer instace, or just several reports at the same time,
which would save much time instead of running reports one by one.
*** 07/19/09 11:57 pm *** (CHG: Sta->97)
*** 07/19/09 11:57 pm RESPONSE ***
ALSO SEE THIS FROM SUPPORT
Error 'Unable To Connect Discoverer Server: Null' When Opening A Second Plus Session From The Same Browser [ID 790187.1]
Cause
Bug 6656139, JVM 1.5 : RUNNING TWO PLUS SESSIONS ERRORS WITH UNABLE TO CONNECT: NULL
The Java Console reports the following error:
Error: java.lang.StackOverflowError
java.lang.StackOverflowError
at java.awt.DefaultFocusTraversalPolicy.accept(Unknown Source)
at java.awt.ContainerOrderFocusTraversalPolicy.getFirstComponent(Unknown Source)
at java.awt.ContainerOrderFocusTraversalPolicy.getFirstComponent(Unknown Source)
at javax.swing.DefaultFocusManager.getFirstComponent(Unknown Source)
Per Bug 6656139 this problem is a limitation/bug with current Sun JRE 1.5
and higher and needs to be addressed by Sun.
Solution
Currently launching two Discoverer Plus sessions from the same browser connection page is not supported/certified.
Enhancement Request :
Bug 7261918, ALLOW ABILITY TO LAUNCH TWO DISCOPLUS SESSIONS FROM SAME BROWSER CONNECTION PAGE
has been logged for this issue but is still waiting on a Sun Java fix.
Use the following workaround:
Use JRE 1.4.2_xx until the ER is implemented and the SUN JRE bug is fixed. -
Multiple sessions with Viewer 3.3.61
Hi,
I have Discoverer Server set up on a single machine, using OAS as the HTTP server, and Viewer 3.3.61.
If a user tries to run 2 queries at the same time (opens up two browser windows), one of the queries will be cancelled (usually te first query started).
Why is this? Is this normal functionality, or do I need to set something up for multiple sessions? If I need to set something up, where can I find documentation?
Thanks,
Suzanne
nullSuzanne,
I think this is normal for Discoverer. It seems to be that there is a session for each user login. Thus a single query for each login. This is just my observation.
Christopher -
Using session.xml file from WorkB in a Session Facade based on another xml
Hi
I have the follwing scenario.
Need to read data from a set of tables and convert them into an XML file based on an XSD.
I am planning to use Toplink POJO in JDeveloper to create a SessionFacade to read the values.
I tested the SessionFacade using a client and I was able to read the values correctly.
Based on my xsd, I created a project in Workbench and mapped the classes created earlier, I was able to test this mapping using a test xml data file.
I was able to read the file, Unmarshall it, manipulate it and generate an XML.
Now the question is how do I call this Marshalling from my SessionFacade ?
Since two session.xml files are in different format, I could not copy the content from one file into another.
How do I create a JAXBContext based on a different session.xml?
Thanks
Sambath
Oracle ConsultingHi Doug,
Thanks for the response. I did the same and I was able to make it work, soon after I posted. I should have updated it :-)
I used two sessions file.
The OXM expected the name of the file to sessions.xml and I have to keep it that way. I created a ormsession.xml using JDeveloper and referred the ORM Project created in the Workbench to use it for ORM . In fact I created a dummy ormsession.xml file in JDeveloper wiht a session named "default". I started by creating an entry manually by copying the contents of the session definition and renamed to "MySession"
Once again thanks for following up
Thanks
Sambath -
How to handle multiple session in ADF using jdevloper11g
Hello All
i want to use the form in Multiple sessions.
i have one sign up form. user enter only 4 to 5 fields & he may not fill the the manditory field & he left.but data base dont give the error to him. but next day he will come at the next day to complet his sign up i.e. when he commit the all detail that time all validation will hapen.
for that i use one table without constrain to store the temarory detail.& use other table (with constrains) for final submition.
1) i creat the view n entity for temparory table
2) & also i create views n entity for Final table
n i create one methos in viewRowImple file in that file i overrid create method from using this i set the value from tempary to final table...
but when user left the manditory field then it allow to submit the data in temparory field but when i copy that data to final table(with constrain) n user submit the data then validation happn i.e. "this fild is mandatory".when i click this error message it goes to first screen.
IS Thiis Possible.. in ADFGenerally this can be done.
I see a problem with your use case, which has nothing to do with jdev or java:
How do you identify the user when he comes back to finish the form?
For this you can't use information like session cookie or IP address because they change.
So you have to save some information about the user which lets you identify him when he comes back. All other requirements can be implemented by ADF.
Timo -
How to open multiple Sessions in Solution Manager
Good Day Gurus,
I am currently working on Solman 7.1 Sp12.My question is :Is it possible to open multiple sessions in Solution Manager? Here is the scenario: The client is working on multiple incidents and instead of logging on to the system again to access the 2nd incident he would like to open another session within the current call he is working on.
Is this functionality possible in Solman? I have seen the functionality working before in CRM interaction center not sure if it applies in Solman.
Your help is highly appreciated.
Thanks
MariaHi Maria,
Options to Call a Function in an SAP System, by entering transaction codes in the command field, the transaction in bold is the one your want for opening multiple sessions.
You can use the F1 key on the command field to display the following possible entries:
/N to cancel the current transaction
/NXXXX to call transaction XXXX directly from another transaction. Without the prefix, you can only call XXXX from the SAP Easy Access screen.
/O to display the overview of the SAP GUI sessions on your computer
/OXXXX to call transaction XXXX in a new window directly from another transaction
/NEND to end the log on session with a confirmation dialog box
/NEX to end the log on session without a confirmation dialog box
/I to delete the window you are currently using
Regards,
Ruth -
Hi,
I have created SAP transaction ivews in my portal with SAP Logon tickets to connect r/3. End users are having tendency to open multiple browser window using Ctrl+N. This way they dont have to login many times and can have many portal window open.
The problem here is for each new window opned with Ctrl+n it opens a new session in R3. this way there are so many sessions are opened in R3. Is there any way we can prevent multiple sessions in R3?Hi Rick.
I also meet with the same problem , situation.
We have tried with parameter
login/disable_multi_gui_login
but it does not work if login come from EP SSO.
When user open backend R/3 from EP SSO, it will not be considered as a new connection, so the parameter validation does not work.
I check the documents. EP has some session management methism to control the too much sessions to backend system.
And in our project, our solution is that we develop a userexit in R/3. When user login in R/3 from EP for more than 1( the number can be changed as u want ) times, the R/3 will tell user that he can only connect to R/3 for one connection, he can go on ( terminiate the old one ) or quit current.
Maybe you are looking for
-
How to access onActivityResult() in nativeExtension Activity??
hi.. I want to access method in native extension activity.. I call startActivityForResult() method for execute other activity.. but it can't receive return value.. because startActivityForResult method is called in activity.. how to get result in nat
-
Using CORR function with sub-queries
I need to compute the correlation of two datasets, however here is my problem: The table stores responses to a questionnaire, with these columns: RESPONSE_ID, QUES_ID, ANS_CD What my query needs to get is the Correlation of 2 sets of ANS_CD, one with
-
The fan in my Macbook Pro heats up
The fan in my Macbook Pro heats up quite fast. I wanted to know how much it would cost to get it fixed as I don't have Apple care and my warranty has expired?
-
How do i get non-tunes videos on to my ipod?
i have a 30G ipod video i have manged to get the videos into itunes but i cnt upload it to my ipod, if this problem can be fixed pls could u lert me know? or if its broke could u also let me now?
-
Invoking an ESB Routing Service
Hi, I have a routing service that i have installed on an Oracle ESB Server. When i test the web service from Oracle Application Server (by searching for the routing service port from the Oracle Apps Server itself) - its sucessful. The problem i have