Session based rmi
hi everyone.
to be honest: i am a 100% newbie with rmi. anyways, this shouldnt be difficult for someone who has worked with rmi already.
i am trying to write a phonebook application (just playing around with rmi yet) with a rmi server and a several client with two user levels:
- user (can only review the data)
- admin (can also modify the data and shutdown the server)
what i need is a concept how it works to retrieve a user level (based on username / password) on client-side and how to differ who has called a specific method on server-side.
please direct me in the right direction!
thanks in advance.
I hope i get what u ask right
1)
have an interface like this
public interface itf extends Remote {
Integer createAuthority(String password, String username) throws RemoteException;
Data getData(Integer Authority_id) throws RemoteException;
public class Impl extends UnicastRemoteObjectit implements itf {
public Integer createAuthority(String password, String username) throws RemoteException {
// add ur logic here, assign the user a right authority id
public Data getData(Integer authrority_id ) throws RemoteExceptiona {
// 1) check if the authprity id is valid
// 2) check the power level...to what is allowed under this authority
every method u have here put an authority id (integer) as input could force users to log in first
then, u can decide what to do for the user when they call the remote metod with their authority id
u can provide some method to check whether the authity id is valid or what u want to do, if u dont want put many statements in one method
2)
i think the important point is create a good id
then store it in the server
like
Hashtable table = new Hashtable();
table.put(authority_id, Authority object); // this is in the createAuthority method
then, retirve it when every u need it
Authority object = (Authority)table.get(authrotiy id)
3)
create an Authority object to store any imformatoin u need
to use together with authroity id
Hope this can give u some idea what to do
Similar Messages
-
Access to a logged-in user's information via a session based object
I am in the process of putting together a design for the security layer of a given
application I am working on. The requirements for authentication demand that
the framework take advantage of digital certificates and username/password verification.
The digital certificate end is relatively straightforward in terms of configuration
within WebLogic 6.1. I am planning on implementing a RDBMS security realm for
the username/password verification piece and again, from the documentation I have
seen, it seems relatively straightforward in setting that up as well.
The question I do have is in regards to once the user has successfuly logged in
to the application. Is there anyway to manage and have access to a set of user
info or credentials once they successfuly log in - aka some sort of session based
object that WebLogic Server facilitates? Or is this something that will have
to be explicitly built from our end if requirements do arise that necessitate
user information to be readily available as such?
Any feedback would be helpful....thanks!!Use the cfquery tag to query the database. If you don't know
how to write sql, I have heard good things about the book, Teach
Yourself SQL in 10 Minutes by Ben Forta. -
How to invalidate a session based on the session id
How to invalidate a session based on the session id
You have to write your own support for this.
It used to be in the API, but was deprecated as a security hole.
The best way to do it is implement a session listener (javax.servlet.http.HttpSessionListener) which notifies you when sessions are created/destroyed.
You can then keep a map of sessions in your own code, indexed by session Id, and access any/all of them to invalidate as you choose. -
Trace session based on CLIENT_IDENTIFIER
Hello all,
i am on 11.2.0.1....we have a sap application and trying to trace a session from DB end....and seems like the job that the end user runs jumps from one session to another....in this senerio...how would i trace a session ??? i read article about dbms_monitor package to trace it...but as i mention, sap keep chaning the session from one to another.....
i read the below article...
http://ocsurabaya.wordpress.com/2007/07/18/tracing-sql-in-oracle-database-10g/
in which it suggest to set the service name and module name....but the problem is its hard to get the module name as its doing quite a few things....it jumps from one module to another....is there anyway to trace a session based on its CLIENT_IDENTIFIER (from v$session)....as this looks like the domian user account for that user who is running the job....
as i mentioned during that time(when job is ran)...the sid changes, modeule changes...the only thing consistent is the CLIENT_IDENTIFIER ( which seems to be the domian user name )...
so how can i trace a session based on CLIENT_IDENTIFIER ??user8363520 wrote:
Hello all,
i am on 11.2.0.1....we have a sap application and trying to trace a session from DB end....and seems like the job that the end user runs jumps from one session to another....in this senerio...how would i trace a session ??? i read article about dbms_monitor package to trace it...but as i mention, sap keep chaning the session from one to another.....
i read the below article...
http://ocsurabaya.wordpress.com/2007/07/18/tracing-sql-in-oracle-database-10g/
in which it suggest to set the service name and module name....but the problem is its hard to get the module name as its doing quite a few things....it jumps from one module to another....is there anyway to trace a session based on its CLIENT_IDENTIFIER (from v$session)....as this looks like the domian user account for that user who is running the job....
as i mentioned during that time(when job is ran)...the sid changes, modeule changes...the only thing consistent is the CLIENT_IDENTIFIER ( which seems to be the domian user name )...
so how can i trace a session based on CLIENT_IDENTIFIER ??is application 3-tier?
does application utilize connection pooling? -
CSS 11503 Stickyness session based
Need assistance comming up with a soulution for session based Stickyness.
1.can this be based on the J-Session ID?
2.Can the CSS send a cookie and the clients stick to the same servers until the session expires and the cookie os removed?
3. Also can we set a timeout value for the cookie?If servers are setting the cookies then you need something like this
Service webserver1
ip address 10.10.10.1
string server1 <-- server cookie value
active
Service webserver2
ip address 10.10.10.2
string server2 <-- server cookie value
active
Service webserver3
ip address 10.10.10.3
string server3 <-- server cookie value
active
content mycontent
vip address 12.12.12.12
add service webserver1
add service webserver2
add service webserver3
string prefix "JSESSIONID="
protocol tcp
port 80
url "/*"
advanced-balance cookies
sticky-inact-timeout 60 <-- Inactivity timeout value for cookie
active
The string prefix (that goes on the Content Rule) would need to match be the name of the
cookie string prefix "JSessionID="
Then the string on the services would need to match the value that is inserted on each
server:
Example:
Service webserver1
ip address 10.10.10.1
string server1
active
Then the cookies injected from server1 would need to look like this:
JSessionID=service1
That is how the CSS would then identify which server the cookie belongs to and how to send
it to it. If the JDSessionID values are random, then the CSS would not be able to match the values to a service. -
WS2012R2 - Session Based Printing Issues
So several months ago (four?) my organization moved and we upgraded all of our servers to 2012. We are a medical organization that uses terminal services aka RDS to rdp into a session based server to access our main clinical app. From this session,
the users need to print out various documents from that application. For printing, we have a print server that has all of the printers installed on it. Both users that use the remote session and users who do not access the printers through the
print server. The printers are deployed to each user via several GPOs so that they only get the printers that need access to. We do this mainly so people do not get confused with which printer to print to and so they do not send print jobs to our
other locations (connected through a WAN.) The main trouble we are having is with users on terminal server sessions. When I right click on a printer in the control panel of someone who is in a session, there are multiple copies of the same printer that
show up. It appears that our PDF application will not show these printers when this occurs.
I guess my main question is: in my organization's setup, what is the best way to set up the printers on the session server?
I was also wondering about the "Easy Print" driver? Is that something I need to enable/disable?
Lat me know of any clarifications I may need to make.
Thanks in advance.Hi,
Thank you for posting in Windows Server Forum.
Here providing you basic understanding to use Easy print driver.
RD Easy Print is a proxy for every print action that simply redirects all printing-related work to the user's local machine without the need to install any print drivers on the TS server. This system provides several benefits, such as being able to redirect
any printer from the user's client machine without having to reconfigure the server while still allowing the user to configure the print job as though he were printing on his client machine.
For your environment, you can use Easy print driver option also by which you don’t have to install printer driver on server.
For more information, you can refer beneath articles for detail.
Using Remote Desktop Easy Print in Windows 7 and Windows Server 2008 R2
http://blogs.msdn.com/b/rds/archive/2009/09/28/using-remote-desktop-easy-print-in-windows-7-and-windows-server-2008-r2.aspx
How to configure Microsoft RDS Universal Printing
http://www.virtualizationadmin.com/articles-tutorials/vdi-articles/microsoft-hyper-v/how-configure-microsoft-rds-universal-printing.html
Hope it helps!
Thanks.
Dharmesh Solanki -
Killing a Session based on Session ID
Is it possible to kill a Session based on Session ID ?
The Scenarioo is when Same user logs in two different browser, the second user should not be allowed to login. But at the same tiome, the first user's session has to be killed . How to do this ?How to prevent duplicate posts?
http://forum.java.sun.com/thread.jspa?threadID=632857&tstart=0 -
Session based load balance + Prepared statements
Experts,
From the docs I understand that there are 3 load balancing techniques. One is client side and two are server side. Of the two, one is session count based load balancing, and as per docs, it is recommended for connection pool setting.
My question is if I have prepared statements originally created using connection to node1, and say if listener re-directs the conneciton to another node node2, will the prepared statement work on node2 ?.
Thanks
VissuJust to clarify, the question is:
Are the prepared statements usable when we use session count based load balancing. -
i have a project wich is based on online Testing System i want
a increament in int type variable related to the user session, I have
tryed session.setAtrribute();and session.getAtrribute(); methods but they are not working properly plz sugest me some right idea to solve my this problem
its urgent
thax
ThePalswhat's not working?
session.setAttribute("counter", new Integer(0));
Integer counter = (Integer)session.getAttribute("counter");
counter = new Integer(counter.intValue()+1);
session.setAttribute("counter", counter); -
Anonymous vs session-based static content
I am running the 7.0 Portal and I am running into a problem where all my static content is being served from within a session context, or not anonymously. This is causing MAJOR performance hits. Eventually, when this app hits production, all static content will be served off of an Apache box, but is there not a setting somehwere that will allow the BEA web server to serve this content anonymously?
Thanks,
JustinA recent blog on this subject: http://www.extended-content.com/logged-out-of-ucmwebcenter-content-after-opening-an-adf-page/
-
I want the list sql queries performed someone in one session based
V$SESSION V$SQLTEXT and audsid (taken from sys_context('USERENV','SESSIONID') ) are great .. session_id be generated by a trigger when the application logs on) but then uploading the list of sql queries made by that user (application) until they log off seems impossible.
I've tried creating triggers that check if V$SESSION changes with respect to an audsid number and sql_hash_value but it didn't work. I'm trying to work out why.
In the meantime I thought I'd post this to see if anyone else foudn another way.
I don't want to use sql trace that just gives load of info, I just want simple sql queries.
Auditting seemed a bit complicated, can that list ALL DML and DDL commands made by a user? if so how?
thanks
Bobbyquite right.
Oracle enterprise dedicated server 9.2.0.8 on solaris 10.
I just want to log all command DML and DDL, without stats or anything like that, simply a list, in a chronological order would be nice.
I found something called dbms_fga package but not sure if thats what I want. Seems I have to implement it on specific tables. which is not good if the application hasn't created the tables yet.
Thanks in advance. -
CF8: Cluster session-based ColdFusion Components
Using CF8:
Is it possible to store ColdFusion components in the session
scope when using clustering and session failover?
Is it possible to replicate their state across a ColdFusion MX
cluster?
I remember that with cf6 and cf7 it wasn't possible (
http://www.adobe.com/devnet/coldfusion/j2ee/articles/endtoend.html).
I think that the CFC serialization is the answer: but I'm not sure.
thanks in advance
federicoquote:
Originally posted by:
Grizzly9279
My understanding is that CF8 supports CFC serialization now,
which implies that CFCs stored in session should successfully
replicate across cluster nodes.
yes! Finally it's possible!
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=clustering_6.html
federico -
Find blocking sessions based on forms
Hi,
We use R12 applications and database 10g and wanted to kill blocking sessions that were created from forms in oracle applications.
How to find out them?You can use the resource manager to kill the blocking sessions.
Also you can query to find the blocking sessions:
select SID, SERIAL#, machine, USERNAME, status, BLOCKING_SESSION
from v$session where BLOCKING_SESSION IS NOT NULL
UNION ALL
select A.SID, A.SERIAL#, A.machine, A.USERNAME, A.status, A.BLOCKING_SESSION
from v$session A, V$SESSION b WHERE A.SID=B.BLOCKING_SESSION
order by machine, status; -
Kill Session based on apex_040000.wwwv_flow_sessions$
Hi,
I am trying to find a way to terminate a session which exist in apex_040000.wwwv_flow_sessions$
The requirement is that I check apex_040000.wwwv_flow_sessions$ for a particular ID and if it exist, must terminate the session.
To be done in Application Express 4.0.2.00.07
Thank youHi,
I believe that the termination of sessions is not supported. However, I am sure that I am not the only one who has found themselves in this situation?
The alternative solution would be to grammatically somehow log the user off?
Any suggestion are welcome.
Thank you -
How Session based web Application should work even after session expiry??
I am looking for an experts opinion that how could I develop an application that should work after the expiry of web session too in the same way as it works in web session.
How the session should be activated.
As I understood, what if I store all the required information in xml and then on unlock session reload all the information from XML.
Am I right or is there any other better way to do using servlets.
Basically I need to implement Lock and UnLock mechanism in an application.
ThanksI'm not sure I understand your question. But since no one answered this yet, here is my idea:
If the user's session expires, any unsaved data is lost. The user should expect this.
If do need to save any data, normally you store it it a database table with the user's ID so you can retrieve it. Two free databases are Oracle Lite and MySql. However, this will take quite a bit of time to learn if you are not already familiar with databases. Storing it in a database and retrieving it is much much faster than storing it in a file.
Maybe you are looking for
-
Sometimes when moving over an image, mt cursor changes to a hand with a blue magnifying grid. How can I disable this? Thanks!
-
HI, I has a JMS-XI-IDOC Scenario where i has used BPM to get the response from RFC wehre the RFC input is the message from JMS. The Response Message from RFC is mapped to IDOC .The Scenario is working and the IDOC is getting created in SAP System Iam
-
hI, What is error stag in BI 7 Today unfortunatly I had checked option error stag when some data is posted, but unfortunatly I was not able findout the option to disable to see error data, The activation button has chaged to green with 0 records.. Pl
-
My new CanoScan 900F scanner won't work on my MacBook Pro even though I've followed all instructions to make it compatible with the 10.7.2 OS. The USB connection isn't recognised. What else con I do?
-
Eject key not operating USB DVD drive
Hi guys I have a 2012 Mac Mini running Mountain Lion and I'm using an official Apple bluetooth keyboard. I just bought a Samsung USB DVD drive and it ejects using the icon on the menu bar just fine. However the eject key on my keyboard is 100% unresp