In the current version as at this posting, it is output into the server log and retrived via the "View System Log" feature in the AWS console.
Reference: https://bitnami.com/stack/wordpress/cloud/amazon
My online tech scrapbook where I keep my notes in case I need to look them up later
Monday, January 26, 2015
AWS HVM vs PV
HVM: Hardware Virtual Machine
PV: Paravirtual machine
HVM is newer (feature of new CPUs). Some of the newer instance types only support HVM.
References:
PV: Paravirtual machine
HVM is newer (feature of new CPUs). Some of the newer instance types only support HVM.
References:
- http://palakonda.org/2012/10/30/aws-virtualization-hvm-vs-paravirtualization/
- http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/virtualization_types.html
Saturday, January 24, 2015
Ant SCP Error com.jcraft.jsch.JSchException: reject HostKey
This happens when the target server is not a "known host". Just do a normal SSH to the server and say yes to adding the server to known hosts, and after that SCP from Ant should be fine.
http://anahorny.blogspot.sg/2013/05/solution-for-comjcraftjschjschexception.html
http://anahorny.blogspot.sg/2013/05/solution-for-comjcraftjschjschexception.html
Wednesday, January 21, 2015
REST: When to Use GET, PUT, POST, DELETE in Non-CRUD Situations
In normal CRUD situations, the answer is obvious. In non-CRUD situations, this gets a bit more tricky.
I think the best way to approach this is based on the following quoted from REST Wikipedia page
"The PUT and DELETE methods are referred to as idempotent, meaning that the operation will produce the same result no matter how many times it is repeated. The GET method is a safe method (or nullipotent), meaning that calling it produces no side-effects. In other words, retrieving or accessing a record doesn't change it."
I think the best way to approach this is based on the following quoted from REST Wikipedia page
"The PUT and DELETE methods are referred to as idempotent, meaning that the operation will produce the same result no matter how many times it is repeated. The GET method is a safe method (or nullipotent), meaning that calling it produces no side-effects. In other words, retrieving or accessing a record doesn't change it."
- If the REST end-point has no side effect (e.g. search), use GET.
- If it is idempotent, it is possible to use PUT or DELETE depending on the nature of the request
- If not idempotent and has side effect, use POST
Monday, January 12, 2015
Java Calling Another Constructor of the Same Class
This is similar to "super()" but much less used. This is done with "this()"
Reference: http://stackoverflow.com/questions/285177/how-do-i-call-one-constructor-from-another-in-java
Reference: http://stackoverflow.com/questions/285177/how-do-i-call-one-constructor-from-another-in-java
Saturday, January 3, 2015
SimpleDateFormat Strange Results / Thread Safety
SimpleDateFormat can give strange results when running on a server when multiple threads share the same instance. This is because it is not thread-safe due to intermediate results being stored in instance variables. To avoid this problem always instantiate a new SimpleDateFormat object when needed or find a way to ensure there is one instance per thread (e.g. using ThreadLocal).
References:
References:
Subscribe to:
Posts (Atom)