Thursday, November 19, 2015
Update Trusted CA Certificates for Eclipse Tomcat Debugger on OS X
If you run the debugger in Eclipse, it will use the Java certificate store for verifying the chain of trust of certificates. I had a problem where the Eclipse debugger wouldn't connect to a server whose certificate was signed by my CA, even though OS X trusted the CA in Keychain. Turns out you have to add it to the cacerts file in the Java folder using command line. Check it: http://blog.alwold.com/2011/06/30/how-to-trust-a-certificate-in-java-on-mac-os-x/
Thursday, November 5, 2015
Monday, November 2, 2015
Make your Windows domain controllers NTP servers
Thanks to the author! This works great on my Windows 2012 R2 servers for serving NTP to all the Cisco Collaboration / Contact Center components in the network.
http://htluo.blogspot.com/2009/02/ntp-network-time-protocol.html
http://htluo.blogspot.com/2009/02/ntp-network-time-protocol.html
Fix the Windows Time Service on domain controllers
Finally, a set of commands that fixes the time service on my Windows domain controllers:
http://blogs.msmvps.com/acefekay/2009/09/18/configuring-the-windows-time-service-for-windows-server/
Note that when you run the "net time /setsntp: " command, it will successfully clear the registry settings for the time service, but the console will print the command help text as though you had entered an incorrect command option.
http://blogs.msmvps.com/acefekay/2009/09/18/configuring-the-windows-time-service-for-windows-server/
Note that when you run the "net time /setsntp: " command, it will successfully clear the registry settings for the time service, but the console will print the command help text as though you had entered an incorrect command option.
Friday, September 4, 2015
Java ProcessBuilder has 32KB buffer, .waitFor() hangs if it isn't cleared
If you're running a simple Java ProcessBuilder, and it hangs and never returns when you start it and then run .waitFor() without running separate threads to make sure it finishes nicely, it may be because the ProcessBuilder is out of memory in its STDOUT buffer. The buffer is 32KB, so if your process returns more data than that and you're just trying to do a simple, synchronous .waitFor() call and just wait for it to return with all the data, it will never return if it hits this buffer limit. You must either consume the buffer, use threads, or redirect the output somewhere, like a temporary file. Kudos to "kjkoster" on this thread for the idead and code: http://java-monitor.com/forum/showthread.php?t=4067.
It goes something like this:
It goes something like this:
final File tmp = File.createTempFile("out", null);
try {
tmp.deleteOnExit();
final ProcessBuilder processBuilder = new ProcessBuilder();
processBuilder.command("cat", filename).redirectErrorStream(true).redirectOutput(tmp);
final Process process = processBuilder.start();
final int exitCode = process.waitFor();
BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(tmp)));
String line = "";
while ((line = reader.readLine())!= null) {
System.out.println(line);
}
reader.close();
tmp.delete();
} finally {
tmp.delete();
}
Tuesday, August 11, 2015
Example context.xml for JNDI resource for MSSQL with Windows authentication
<Resource name="jdbc/mydb"
auth="Container"
driverClassName="net.sourceforge.jtds.jdbc.Driver"
maxActive="100"
maxIdle="30"
maxWait="10000"
removeAbandoned="true"
removeAbandonedTimeout="60"
autoReconnect="true"
logAbandoned="true"
username="username"
password="password"
type="javax.sql.DataSource"
url="jdbc:jtds:sqlserver://myserver.mydomain.com:1433;databaseName=mydb;useNTLMv2=true;domain=mydomain;"
validationQuery="SELECT 1"
validationQueryTimeout="1000"
testOnBorrow="true" />
Monday, April 20, 2015
eGain and Cisco Finesse - Single Sign On
The gadget that Cisco provides for eGain's OEM integration (EIM/WIM) doesn't provide single sign-on of any kind. Neither does the eGain Solutions Plus gadget that eGain provides.
I added simple single sign-on using the Finesse javascript API to retrieve the agent login credentials, but this only works for agent ID logins, and not for username logins. The issue is that the Finesse javascript API (as of version 10.5) will only return the agent ID, whether you logged in to Finesse using your agent ID or agent username. The Finesse REST API, however, will provide you with 'loginName', which will correctly return which one you used to log in with.
Here's the repository for the updated gadget:
https://bitbucket.org/juxe/gadget-egain-sso/
I added simple single sign-on using the Finesse javascript API to retrieve the agent login credentials, but this only works for agent ID logins, and not for username logins. The issue is that the Finesse javascript API (as of version 10.5) will only return the agent ID, whether you logged in to Finesse using your agent ID or agent username. The Finesse REST API, however, will provide you with 'loginName', which will correctly return which one you used to log in with.
Here's the repository for the updated gadget:
https://bitbucket.org/juxe/gadget-egain-sso/
Subscribe to:
Posts (Atom)