Reputation
21,787
Next tag badge:
173/100 score
18/20 answers
Badges
6 42 120
Newest
 Nice Answer
Impact
~931k people reached

1d
comment RESTful HTTP and websocket in the same application?
Chrome Developer Tools if I am not mistaken allow you to open a websocket and send messages real time
Mar
19
comment Is it better not to .close() inside API method body when passed a Reader or InputStream?
@YoYo Well not everything in the API was a good idea either. I think Java Date and Calendar APIs live as a testament to some poor design choices in the standard API. Database connections may come from a pool where close has been overridden to simply return to the pool. Even still I would hope you are not passing database connections around as method parameters.
Mar
18
comment Store encrypted data in XML
@Spotted I would do it in your own way but use the W3C recommendation for guidance. When it comes to standards you are best to go all-in rather than adopt just certain pieces and parts.
Mar
18
comment Store encrypted data in XML
@Spotted I understand now. The core problem you have is that if you actually do not have the decryption keys in the Java side then what else could you do but store EncryptedData in the database? All of your suggested solutions are essentially exactly the same. The only thing I caution you about is to have a additional data points that would allow a different process to determine the encryption algorithm used, and to indirectly find out what decryption key can be used.
Mar
18
comment Store encrypted data in XML
@Spotted I don't understand. Is the ENTIRE XML document encrypted from the device? Is the device giving you a block of encrypted data that represents potentially multiple XML documents and records?
Mar
18
comment Store encrypted data in XML
@Spotted Just store it as is :) You probably want to make sure you have some way to identify the record to a specific device, or else you may not know how to retrieve the decryption key at a later date. There is no problem to store an XML document in a database that has encrypted fields as long as you have some uniquely identifiable fields in that record that can link it directly or indirectly to a specific device or encryption key
Mar
18
comment Store encrypted data in XML
My answer doesn't fundamentally change then. You can still use JAXB with Jasypt to decrypt any fields that are encrypted. I am still confused though as to HOW the data fields are being encrypted? The device firmware would have to be updated to use encryption keys to encrypt the data. Those keys would need to be available on the Java program to decrypt the data.
Mar
18
comment Store encrypted data in XML
What specifically is your requirement however? If it merely needs to be encrypted on transport, then you could potentially solve this problem with few application changes. Otherwise if the data must be encrypted on the device and/or stored in a backend system in an encrypted manner then it certainly becomes more complicated. Furthermore, how is this data being transported? What protocol and medium is being used?
Mar
11
comment Is a big boolean expression more readable than the same expression broken down into predicate methods?
Please avoid using comments for extended discussions. If you would like to continue the conversation then please visit our Chat. Thank you.
Mar
9
comment Is it possible to statically predict when to deallocate memory---from source code only?
Comments are not for extended discussion; this conversation has been moved to chat.
Mar
1
comment Scrum - What are team members busy with during a sprint
This just assumes that only Testers have downtime in the sprint? Devs have downtime as well.
Mar
1
comment Scrum - What are team members busy with during a sprint
To the down voters, what part of Agile training did you miss where it specifies that you should adopt a strategy that works for your team? Robbie Dee's team adopted what worked for them in their unique circumstances with their unique project and environmental constraints. Every company has environmental barriers and "damage" that need to be routed around. This seems like a perfectly acceptable approach to the question that was asked. The question wasn't about the best way to organize testers and testing efforts on your sprint team.
Feb
25
comment What is the reasoning behind naming of the .NETs Select (Map) and Aggregate (Reduce)?
Friendly reminder to be nice please. Thank you.
Feb
22
comment Suggestions to distributed service pattern
@MatthewWhited Thanks for pointing that out. I have never actually used this particular tool but the documentation I read on it seemed unclear and why it would be focused around the database layer is strange to me. I removed the incorrect assumptions from my answer.
Jan
27
comment Zero Downtime Deployment - Transitional Db Schema
@PeterScott You got it. Just keep in mind that you dont want to run the script until you are sure that all active sessions are over in the old system and it has been a long enough time that all DNS caches have been updated to the new CNAME or IP address.
Jan
27
comment How is this Java Keystore cert still valid?
If what I said above is TRUE, then it works not because your server is wrong but because your client application for whatever reason decides to trust it anyway. If the client is a user, and that user is using a browser, typically that browser would see the expired cert and give the user a warning message. The browser has a certificate trust store as well and it could be that the user accepts the certificate problem and decides to trust it anyway. Perhaps the client is another Java system, well normally it would reject an expired cert but it may have a trust store with the expired cert.
Jan
27
comment How is this Java Keystore cert still valid?
Nothing I said here really changes because I am still trying to understand what in fact the certificate is being used for and what behavior are you seeing that is incorrect. If I understand correctly, your Tomcat server is running an old Java app that is using CAS framework to authenticate a Servlet or other network resource being provided by that old application. CAS keystore is configured in Tomcat through a JKS file, it is serving network resources to clients but presenting an EXPIRED certificate that it has in its JKS file. You are expecting this to fail but it works?
Jan
27
comment How is this Java Keystore cert still valid?
Why are you convinced that the application shouldn't start up when the keystore certificate is invalid? Is it being loaded as a keystore and/or a trust store? Providing or requiring a network resource? What error do you expect to see? There isn't enough information here I am afraid.
Jan
14
comment Junction table related to another junction table
This is a good data model, however can you edit your question to provide more explanation to how your data model addresses the specifics of the OP's question? Otherwise this seems like a great answer to a question that the OP didn't ask, which is confusing.
Jan
14
comment Junction table related to another junction table
@mark951131b Premature optimization is evil. If you have strict performance requirements and clearly expected record volumes in the millions then I would suggest implementing a prototype and doing performance testing to see if you meet performance expectations with the current database design. If not only then should you consider denormalization of the database schema and other tuning. Otherwise, join the tables in query. That is why relational databases and SQL are there for you. People seem to have an irrational fear of table joins when it is clearly not a problem 95% of the time.