Some Oct/Nov notes/tips

1. Weblogic 12c Multi-tenant
PAAS use case:
Partition is the process service, similar as managed server, which hosts different resource group, eg: HR partition hosts HR resource group; Finance partition hosts finance resource group
SAAS use case:
Resource Template Group is “software service”, which could be deployed to different partitions as needed. eg. Partition 1 hosts HR resource group (which is from HR resource group template); Partition 2 hosts finance resource group (from HR resource group template) + HR resource group (from its template too).

Reference: https://blogs.oracle.com/WebLogicServer/entry/domain_partitions_for_multi_tenancy

2. bash port forwarding:
ssh -L 7101:host_a:80 -o GatewayPorts=yes host_b

Request to host “host_b” port 7101 will be forwarded to “host_a” port 80, “GatewayPorts=yes” enable external hosts to access “host_b”

3. Oracle DB v12.2, JSON Developer Guide:
https://docs.oracle.com/cloud/latest/db122/ADJSN/toc.htm

4. Oracle DB v12.2 now supports sharding, which usually supported by NoSQL systems by default

5. Main difference between sharding and replication:
sharding: most similar concept is partitioning
replication: most similar concept is master-slave (mirror data)
a more detailed explanation is: http://dba.stackexchange.com/a/53705

6. Automatic time based popup dismiss – new feature in ADF v12.2.1.1:
https://blogs.oracle.com/shay/entry/automatic_time_based_dismiss_of
auto_dismiss
and how to do it in javascript:
http://lucbors.blogspot.sg/2016/10/otn-appreciation-day-programmatically.html

7. Java 8 & 7 GC Cheatsheet:
http://blog.ragozin.info/2016/10/hotspot-jvm-garbage-collection-options.html
java-8-gc-cheatsheet

8. JVM Memory Monitor in JDeveloper:
http://adfdiary.blogspot.sg/2016/10/garbage-collection-in-jdeveloper.html
Add following in jdev configuration file:

AddVMOption -DMainWindow.MemoryMonitorOn=true

After that, jdeveloper will show memory usage at right bottom corner:
jdev_mem_usage

9. HTTP Cookies: Secure Flag and HttpOnly Flag and Session Cookie
Very good article that explains this:
http://resources.infosecinstitute.com/securing-cookies-httponly-secure-flags/
In Servlets 3, instruct the app server to ensure all cookies are HttpOnly and Secure:

<session-config>
  <cookie-config>
    <secure>true</secure>
    <http-only>true</http-only>
  </cookie-config>
</session-config>

Source: http://stackoverflow.com/a/17688579

10. Validate page definition variable declaratively:

In page def file of the attribute node insert child validation node like regular expression validation, list, length validation etc.
Reference:
http://kamilkrasowski.blogspot.sg/2015/02/data-control-validation-level.html

11. How to use custom sql in view criteria:
In view criteria, set “ViewCriteriaItem”‘s “IsSQLFragment” to true and type custom sql in “Value”.
Reference:
http://kamilkrasowski.blogspot.sg/2014/08/tricks-with-view-criterias.html

12. Multiple Master to Single Detail View Instance:
http://kamilkrasowski.blogspot.sg/2014/09/multiple-master-one-detail-relationship.html