w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
How can I select data in the same query from two different servers and databases from SQL Server Management Studio?
On your sql server, set up a linked server to the db2 database. Then write your query on sql server. I suggest that you use openquery for the db2 stuff. If you have to combine the data, populate a sql server temp table with the openquery results and work from there. The reason I suggest this is performance. I have found that if you use this syntax select somefields from server.database.owner.table where whatever sql server will bring back the entire table from the linked server and apply the where clause afterwards.

Categories : SQL

PHP SESSION is NOT SAME (Not-in-Synced) in load-balanced Servers?
If you are using the default file-based session storage engine, then naturally, you can't load balance them (at least, not without using some kind of stickiness). What you need is centralized storage for sessions, e.g. using a database or memcache. See also PHP sessions in a load balancing cluster - how?

Categories : PHP

I am having a requirement in Session Management OAM
You can use HttpSession for this. If user session already exists or not? Check that session is null or not. request.getSession() != null If user clicks on old session, then user will be logged out from current session and can continue old session. Use: request.getSession(false); 3) If user clicks on new session, then user old session will be terminated and continues with new session. Use: session.invalidate(); and request.getSession();

Categories : Java

session management using filters
try this... HttpServletRequest request = (HttpServletRequest) req; HttpServletResponse response = (HttpServletResponse) resp; System.out.println("Inside the filter.............." ); HttpSession session = request.getSession(); User u = null; if(session.getAttribute("customer")!=null){ u = (User) session.getAttribute("customer"); } if (u!= null) { System.out.println("user does exits.." + u.getUname() );// u can see who was logged here chain.doFilter(req, resp); }else{ System.out.println("user does exits.."); }

Categories : Java

ssh with putty from session 0 gives 'servers host key does not match ...' alert
Very likely there is no solution with PuTTY. In OpenSSH you have a set of options to completely avoid the host key verification, with the drawback of lowering the security levels. On Unix derivatives that would be: -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null I think in Windows the second option would read "-o UserKnownHostsFile=NULL". One possible "workaround" would be to manually start putty on the very first connection in order to get the host key in the stored cache. Subsequent calls would not require the interaction unless the host key changes (usually due to either a system re-installation or just the SSH server reinstallation).

Categories : Windows

php session management in socket services
My advice would be to use a database. Let me start out with explaining the general concept of sessions. Sessions can be seen as server-side cookies. The location of the $_SESSION variable storage is determined by PHP's session.save_path configuration. Usually this is /tmp on a Linux/Unix system. Sessions have a session-parameter of the client associated with them. When a session_start or something like that is issued, the server will retrieve the file/session based on the session-parameter provided by client. As these are just stored files, it is possible for the server to read the sessions of other clients. That brings me to the second problem you describe. If I am correct you want to have some api request information about a session of some user. Based on the first paragraph, you hopef

Categories : PHP

Grails get Session and Management in GSP view
You can access HttpSession directly using session variable in gsp, it is bound in view layer. For example: //gsp <p>${session}</p> <p>${session.properties}</p> <p>${session.id}</p>

Categories : Grails

Management session phonegap restful API?
The easiest way to do this is to use the LocalStorage API that phonegap provides. Example: window.localStrorage.setItem('KEY','VALUE'); then: window.localStorage.getItem('KEY'); Full reference here: http://docs.phonegap.com/en/3.0.0/cordova_storage_storage.md.html#localStorage

Categories : Java

Session Management For redirection in Codeigniter
In order to use codeigniter redirect function you must include the codeigniter url helper file, in which this function is actually written. So, Load the codeigniter url helper file in your constructor $this->load->helper('url'); and try by putting a '/' in front of the uri segment redirect('/login'); Your redirect function is not working, as on logout, your session is destroyed, but the redirect is not taking place.

Categories : PHP

Authentication and Session management with Apache CXF DOSGi
You can use a custom intent to control authentication. Basically an intent is a CXF feature that is applied to the webservice by DOSGi. You create the feature in a separate bundle and then publish it with a special property for its name: See the DOSGi reference guide. In a project we created a feature that read a threadlocal containing the authentication context and used the credentials stored there to populate the CXF authentication. So you just have to store the credentials once into the threadlocal at the start of you application and all calls work. Currently there is no simple documenation or example for this case but I plan to create it in the near future as authentication is a common problem. I plan to use shiro as an authentication framework and write a generic adapter for CXF. I

Categories : Java

Session Management in a real time application
Its security risk to use cookies and url rewriting for sensitive data management. The best mechanism is to use http session in conjunction with https. In real world scenarios, http session is used carefully to avoid bottle necks. simply rather than adding an entire object to session, an attribute which can be used to obtain an entity from database is carried over the session. bottom-line is that sessions need to be kept light weight. session best practices include removing the session and invalidating it once its use is completed. in EJB context, its always better to avoid Stateful session beans. If used, the bean has to be invalidated as the last invocation of the bean.

Categories : Java

Authentication mechanism for session management in java web application
You can secure your AJAX URLs in exactly the same manner as normal ones (using intercept-url rules). Example to give you an idea: <http> <intercept-url pattern="/login.html*" access="IS_AUTHENTICATED_ANONYMOUSLY"/> <intercept-url pattern="/**" access="ROLE_USER" /> <!-- Your normal URLs --> <intercept-url pattern="/product-list.html" access="ROLE_PRODUCT_VIEWER,ROLE_PRODUCT_MANAGER" /> <!-- Your AJAX URLs --> <intercept-url pattern="/ajax/add-product" access="ROLE_PRODUCT_MANAGER" /> <intercept-url pattern="/ajax/view-product" access="ROLE_PRODUCT_VIEWER" /> .... </http>

Categories : Java

Spring + Hibernate: Session management within @Transactional methods
No, it's not correct. To get the session associated with the current Spring transaction, you must use sessionFactory.getCurrentSessio(). And you should never close the session: that's the job of Spring, which will close it when the transaction commits/rollbacks, or even later in the open-session-in-view pattern is used. Flushing is generally not necessary, except in the situation described in the Hibernate documentation, and which consists in avoiding increasing the size of the first-level cache when you insert a large number of entities in batch. In your case, it doesn't make sense.

Categories : Spring

Can we implement Web session management relying on HTTPS protocol
The answer: You can not manage your application state relying on HTTPS protocol. Both HTTP and HTTPS are stateless. You should manage your application state using your Web Server session management.

Categories : Security

JavaScript's session history management using S3 static hosting?
There's no way to have S3 ignore the path and just return the root file (index.html). The closest thing to that would be to use an error file that catches all the requests, but although that would load your HTML file, it would always return a 404 status. You could use URL parameters for paths instead of hashes if you don't want to use those, like this: www.yoursite.com/?folder/page.html This would result in the index file of your site being loaded in the browser.

Categories : Javascript

Pass parameter in all requests for session management on server
I think tracking tab as you said is not a good way. To track the changes associated with a user you can use the polling methods. Pull method - Client(browser tabs) query with server in a repeated interval of time to know the changes(For eg: Ajax request). If you use this method your server must be capable of handling large amount of requests. Push method - In this method server pushes messages to the clients whenever there is a new message. This method is advanced than pull method and this will be a live communication(ie, client gets live updates from server with no time. In pull method there is a time interval between each query).eg: Faye, pusher, socket.io Hope this helps you.

Categories : Javascript

This version of Microsoft SQL Server Management Studio Express can only be used to connect to SQL Server 2000 and SQL Server 2005 servers
I just ran in to this issue as well but then was able to find the solution. You just need the newer version of SSMSE which is now 2008! Here's the MS download page: http://www.microsoft.com/en-us/download/details.aspx?id=7593

Categories : Misc

Doctrine - Entity holds proxy after detaching for session management
I had to use a very crude approach. I figured out the following: given I'm not going to reattach the information immediately, I remade another ContenedorInformacion which contains the exact same information than the proxy. And given the ArrayCollections aren't using proxies but rather the whole objects, I did this. public function login(Persona $t) { if ($this->autorizar($t) === false) { return false; } $dao = new DAOManejadorMsSql(); $daoPersona = $dao->fabricarDAO("CodesinColegiosPersonasPersona"); $t = $this->buscarPersona($t); $daoPersona->soltar($t); $dao->cerrar(); /***** NEW LINES START HERE *****/ $contInfo = new ContenedorInformacion(); $contInfo->setId($t->getContInformacion()->getId()); $contInfo->s

Categories : PHP

Qt. How to send multiple simultaneous requests from multiple proxy servers
QNetworkAccessManager supports multiple concurrent requests, there's no need for you to use multithreading directly unless that makes things easier on your end. To track multiple subsequent requests belonging to each other, I'd suggest to use the Command Pattern to group them: Each flow of communication to one of the proxies would be managed by a job object. See this other answer where I describe why I find the command pattern useful, in a very similar context.

Categories : Qt

How to view data in table variables during debugging session in MS SQL Management Studio 2012?
Whilst I can't find any documetation, anywhere, that explicitly states that you cannot inspect table variables, I don't believe that it's possible. From Transact-SQL Debugger Locals and Watch. These windows display currently allocated Transact-SQL expressions. Expressions are Transact-SQL clauses that evaluate to a single, scalar expression. The Transact-SQL debugger supports viewing expressions that reference Transact-SQL variables, parameters, or the built-in functions that have names that start with @@. These windows also display the data values that are currently assigned to the expressions. (My emphasis) That is, you can only inspect scalars. As to your attempt to use the Immediate window, the Limitations on Debugger Command and Features says: The Immediate window is displ

Categories : Debugging

One session design pattern for EJB JPA and GWT RequestFactory aka keeping JPA session between multiple method calls
In your web layer you have two calls to a stateless session bean, so this results in two transactions. There are three options Use a UserTransaction in your web layer code: final InitialContext ic = new InitialContext(); final UserTransaction ut = (UserTransaction) ic.lookup("UserTransaction"); ut.begin(); try { // find // set new value in entity // save ut.commit(); System.out.println("committed"); } catch (Exception ex) { ut.rollback(); System.out.println("rolled back"); } This way the client controls the transaction. If someone forgets to use a UserTransaction, this will result in multiple transactions. There is no need to change the EJB side. Add a method in the facade which calls both DAB methods on behalf of the client: public void findAnd

Categories : Java

IIS 8 and ARR with multiple other servers
Ok so the trick was with this rewriteRule : ^(.*)/youtrack/(.*), Thanks man you really helped me. Only i have to rewrite to localhost:81/{R:2} then. Also as Malvin said there is a par wher you have to enable Application request routing in hidden menu and that was whole trick.

Categories : Iis

How to performe command in multiple servers through ssh?
for i in {1..3}; do `ssh nginx_$i ps aux | grep logstash`; done ^ ^ Drop the backquotes. If you include them, the shell will try to execute the output of the command.

Categories : Linux

SSE subscribers - distributed across multiple servers?
There is presently no free lunch/ silver bullet for multi-node parallelism. Most people use an SOA approach (REST, queues, etc) to parallelize their application. Of course in the large you lose ability to coordinate access to resources, and the work-arounds can be hackish. I have heard good things about Immutant's (Jboss's) XA transactions that automatically apply to how their caching and messaging work, but have not used this approach personally. Another tool you may find useful is Storm, which allows you to set up a topology for distributed processing, adding some declarative abstraction in place of tedious manual development and provisioning of equivalent service architecture.

Categories : Clojure

Joining tables across multiple servers
Yes, assuming the account has appropriate permissions you can use: SELECT ... FROM A.table t1 JOIN B.table2 t2 ON t2.column = t1.col You just need to prefix the table reference with the name of the database it resides in.

Categories : Mysql

Rails Observers on multiple servers
Depends on what you call observation, I assume it's model observers? The point is each of your servers are isolated, so you can't share data easily without playing with Thread safety and Mutex objects; or shared temporary database table. An easy way to have a central notification of model activity would be to use a (or a cluster of) redis server. Redis can be monitored by a Rail central process so when any of your server post an event in Redis, you Rail central process is notified right away. http://redis.io/

Categories : Ruby On Rails

Multiple servers in only one TupleSpace in DRb (Ruby)
DRb is a fairly low-level means of IPC. You may find the following higher-level solution easier to use although you do have to set up an infrastructure first. You don't say whether you are on Linux or something else, but this works on Linux and runs pretty much out of the box on Gentoo: Jerbil on Github A Painless Approach to Ruby Linux Services

Categories : Ruby

Version control over multiple FTP servers
The question is too broad, but since it's tagged git I'll look at it from this perspective. If you maintain your website projects in Git, or maintain your class library (or whatever it is in PHP) in Git, you could use a specialized Git → FTP tool, git-ftp, which can be used to update remote directories via FTP from Git repositories. It works by keeping a file in the remote directory which records the commit ID with which the last synchronisation has been made, so the next synchronisation will only update/delete/modify those files/directories which have been actually changed.

Categories : GIT

NodeJS Memcached - Use multiple servers
The library installed when you npm install memcached seems to be node-memcached. Adding multiple memcached servers is explained in the documentation, specifically here.

Categories : Node Js

Spring security session management and Spring MVC view resolver error
You are redirecting to the jsp not the mapped url. session management tag should be : <session-management invalid-session-url="/login?error=sessionExpired" session-authentication-error-url="/login?error=alreadyLogin"> <concurrency-control max-sessions="1" expired-url="/login?error=sessionExpiredDuplicateLogin" error-if-maximum-exceeded="false"/> </session-management>

Categories : Spring

Use PowerShell to run virus scan on multiple servers
I'm using something like this for running tasks in parallel on remote hosts: $maxSlots = 10 $hosts = "foo", "bar", "baz", ... $job = { Invoke-Command -ScriptBlock { Scan32.exe } -Computer $ARGV[0] -ThrottleLimit 10 -Authentication domain/admin } $queue = [System.Collections.Queue]::Synchronized((New-Object System.Collections.Queue)) $hosts | % { $queue.Enqueue($_) } while ( $queue.Count -gt 0 -or @(Get-Job -State Running).Count -gt 0 ) { $freeSlots = $maxSlots - @(Get-Job -State Running).Count for ( $i = $freeSlots; $i -gt 0 -and $queue.Count -gt 0; $i-- ) { Start-Job -ScriptBlock $job -ArgumentList $queue.Dequeue() | Out-Null } Get-Job -State Completed | % { Receive-Job -Id $_.Id Remove-Job -Id $_.Id } Sleep -Milliseconds 100 } # Remove all remaining jobs. G

Categories : Powershell

copy folder to multiple servers with different %userprofile%
if the user is running it then this should mirror the source to the target folder, making them identical. @echo off robocopy "\NAMEOFMACHINEC$UsersMAIN USERFavoritesLinks" "%USERPROFILE%FavoritesLinks" /mir

Categories : Windows

Scaling Image Hosting With Multiple Servers
As far as the database is concerned, you probably want to use replication - whereby your 'master' database is replicated (in real time) to several 'slave' databases. All transactional statements (inserts, updates, deletes, etc.) are executed on the master database, then these are replicated to all of the slave databases in real time. Then, you can distribute the applications queries (select statements) across all of the slave databases for load balancing. You may also want to keep copies of files on multiple servers for redundancy. Tools like rsync are good for this. Finally, Amazon has cloud load balancers, so that incoming connections can be distributed to multiple servers.

Categories : PHP

Should/can a client use the same port to bind to multiple servers
Should a client use the same socket to bind to multiple servers by default No, because a client cannot use the same socket to bind to mutiple servers, by default or any other way. Do you mean 'use the same port?' Let's say I have a client who connects over TCP to 1000 different servers on a bunch of hosts. And then I'd like to start up 100 clients on the same host. I normally would run out of ephemeral ports (assigned by the os). So in other words you do mean 'same port', not 'same socket'. My solution is for each client to bind to 1 port when connecting to all 1000 servers (thus only using 100 ports). But your 'solution' doesn't work. The operating system won't let you reuse the same local port for multiple simultaneous outbound connections. My question is - should th

Categories : Linux

How can I keep multiple gevent servers serving forever?
Start each server loop in its own instance of Python (one console per gevent). I've never understood trying to run multiple servers from one program. You can run the same server many times and use a reverse proxy like nginx to load balance and route accordingly.

Categories : Python

Connect to multiple ftp servers using Spring integration
The Dynamic FTP Sample explores a technique for creating multiple parameterized contexts on the outbound side. On the inbound side you have to make the context a child of the main context, so that it has access to the channel to which to send the files. This is discussed in this Spring Forum Thread and other threads linked from there.

Categories : Spring

Setting up web farm for DNN 6.2.6 CE with multiple file servers
The recommended way or doing a web farm for DNN is to use a single UNC share. Even with the paid editions of DNN that is the recommended approach. Is it possible to do it any other way, yes, but there is nothing build into DNN to help you do so. If you want to use multiple file servers you start running into issues with file based caching, module installations, etc.

Categories : Caching

Update Multiple columns in sql and oracle servers
The standard ANSI SQL implementation will work with both sql server and oracle UPDATE <TABLE Name> SET Col1 = ColValue[, Col2 = Col2Value, .....]; The only thing that you have to put is a semicolon at the end of update statement, as ";" is mandatory statement terminating operator in oracle, where as it is optional in sql server. NOTE: The clauses that I put in square brackets ([]) are optional. NOTE 2: UPDATE..FROM is a properietry syntax used by SQL Server, so it cannot be accepted by oracle.. NOTE 3: UPDATE SET (col1,col2) = Col1,Col2 is a syntax supported by oracle but not by sql server.

Categories : SQL

PHP curl_init load ballance multiple servers
If you're looking for a poor-man's load balancer, you'd enumerate your endpoints into an array, call shuffle() and array_pop() the lucky winner. <?php $endpoints = array( 'http://api1.myco.com', 'http://api2.myco.com' ); shuffle($endpoints); define('REST_SERVER', array_pop($endpoints)); // ... ?> I'd also suggest you vet each candidate to ensure it's "up"/"available" before issuing API calls, which is outside the context of this question.

Categories : PHP

Executables deployment in multiple servers regularly
There are many system management tools. Chef is what we use, it is great but there is a bit of a learning curve. You may want to look into your OS's default package manager and distribute packages of your code base.

Categories : Shell



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.