Tuesday, March 22, 2016

rbenv vs RVM

RVM is responsible not only for changing Ruby versions, but for installing rubies and managing gemsets, as well.
...Along with rbenv [to manage ruby versions], we’re using Bundler to manage gems (replacing gemsets) and ruby-build to install rubies.

See also chruby;
Notes: bundler (for resolving deps per Gemfile.lock)

Wednesday, January 20, 2016

Session State in an SSL Connection vs in Cookies or URL Rewriting

When exchanges between OC4J and a client include sensitive information, the transmissions should occur over a secured connection. You can achieve this with HTTPS (transmitting the HTTP protocol over SSL sockets... . In this case, cookies or URL rewriting would not be appropriate for transmitting a session ID, given that the ID could be intercepted or spoofed. If the value of the session ID is compromised, the associated session state is vulnerable.
In this secured transmission situation, where HTTPS is used for all transmissions, OC4J stores the information needed to retrieve the session state directly into the SSL connection, as an attribute of the SSL session (functionality that is invisible to the user).

Saturday, May 3, 2014

Encoded vs. Literal & RPC vs Document WSDL Types

This article http://johnderinger.wordpress.com/2009/10/25/wsdl-binding-styles/ pretty much spells it out. The Takeaway is that Document Literal Wrapped makes the most sense because while staying WS-I compliant by having only one element under body, that element is the method name, so the method parameters, which in RPC style were separate messages, are wrapped in the method name (note "wrapped" actually refers to the fact that the method parameters are not shown in the WSDL message 'part' but "wrapped" or in other words exist implicitely by virtue of element reference to corresponding element of method in attached schema) in both the WSDL message and WSDL types schema under a complex type. Note, in Document Literal the complex type contained no method name neither did the actual soap message (the message as seen being sent by the client over the wire, not the portType/message WSDL elements) so the message could not be validated or dispatched properly.
So my take is:
RPC encoded - not JAX-WS compliant (must use JAX-RPC or AXIS)
RPC encoded and literal - both easily dispatched because method name is in soap mesage body, but soap message cannot be validated
Document literal - not easily dispatched because there's no method name in the soap message body -- the fact it can be validated doesn't mean much then
Document literal wrapped - best of both worlds: method name included in both soap message body and in type schema

Monday, April 28, 2014

Undefined vs. Null

Was asked this. Presumed it's JavaScript. Answer here: http://saladwithsteve.com/2008/02/javascript-undefined-vs-null.html
Basically one must keep in mind that an uninitialized variable (var a;) is undefined NOT null.
To be accurate when comparing, i.e. if to determine whether is undefined (unset) or null (set to null) use ===, i.e. if (a===null) or if (a===undefined); don't use (a==null) because that will be true regardless of null or undefined due to type coersion.

Saturday, April 19, 2014

Singleton vs. Transient

In the context of an IoC container (see http://docs.castleproject.org/Default.aspx?Page=LifeStyles&NS=Windsor&AspxAutoDetectCookieSupport=1) singleton is created once and reused for injection to dependent components when needed. Transient dependencies are created anew each time they are injected. Transient objects are released when the dependent object is released unless the dependent object is the root of the graph (the root of the graph is not managed by the container), i.e. Resolved explicitely -- in which case the transient must be Released explicitely or face potential memory leaks.

The transient keyword in the context of Java indicates to the writeObject method of the ObjectOutputStream that the field should not be considered part of the object state and thus not serialized.

Wednesday, March 19, 2014

SEI = "Service Endpoint Interface"

"Interfaces are better for sharing with the developers who will be responsible for developing the applications consuming your service. ... The service endpoint interface (SEI) is the piece of Java code that is shared between a service and the consumers that make requests on it."

example of SEI: http://www.mkyong.com/webservices/jax-ws/jax-ws-hello-world-example-document-style/ - see step 1