Tuesday, March 27, 2012
WebSphere Application Server: Component vs Container Managed Authentication Alias
Component Managed Authentication is used when the resource configured in the EJB’s deployment descriptor res-auth property is set to ‘Application’.
Container Managed Authentication is used when the resource configured in the EJB’s deployment descriptor res-auth property is set to ‘Container’.
http://blog.danzrobok.com/2008/10/09/websphere-application-server-component-vs-container-managed-authentication-alias/
Sunday, March 25, 2012
Eclipse PDT - Failed to load JavaHL Library
First, locate your libsvjavahl-1 library :
sudo updatedb
locate libsvnjavahl-1
Mine was under /usr/local/lib
Then edit the path in the config.ini. You have to pass the libsvnjavahl-1 path to the JVM.
Locate eclipse.ini and edit the path and add, UNDER the line : -vmargs
-Djava.library.path=/usr/local/lib
http://superuser.com/questions/111748/eclipse-pdt-failed-to-load-javahl-library
Monday, March 19, 2012
Difference between HashMap, LinkedHashMap and SortedMap in java
Map
interface and offer mostly the same functionality. The most important
difference is the order in which iteration through the entries will
happen:HashMap
makes absolutely not guarantees about the iteration order. It can (and will) even change completely when new elements are added.TreeMap
will iterate according to the "natural ordering" of the keys according to theircompareTo()
method (or an externally suppliedComparator
). Additionally, it implements theSortedMap
interface, which contains methods that depend on this sort order.LinkedHashMap
will iterate in the order in which the entries were put into the map
Hashtable
is an obsolete class from the days of Java 1.1
before the collections framework existed. It should not be used anymore,
because its API is cluttered with obsolete methods that duplicate
functionality, and its methods are synchronized (which can decrease
performance and is generally useless).http://stackoverflow.com/questions/2889777/difference-between-hashmap-linkedhashmap-and-sortedmap-in-java
Wednesday, March 14, 2012
Database indexing - how does it work?
Put simply, database indexes help speed up retrieval of data. The other great benefit of indexes is that your server doesn't have to work as hard to get the data. They are much the same as book indexes, providing the database with quick jump points on where to find the full reference (or to find the database row).
- Primary indexing, secondary indexing
- B-trees and variants (B+-trees,B*-trees)
- Hashing and variants (linear hashing, spiral etc.)
Alice...
...
AZ...
Bob
Bri...
Bza...
Monday, March 12, 2012
new problem with ORA-01843: not a valid month
http://arjudba.blogspot.com/2008/06/ora-01843-not-valid-month.html
Wednesday, March 7, 2012
Callback Methods
Callbacks methods are the way of managing life cycle of an instance. Callback methods are generally used by containers. The methods are called at specific time during the lifetime of an instance. For example in servlet destroy() method is called by the servlet container that indicates that the servlet is being taken out of service. This type of methods are generally called by the container, the developer does not need to call these methods explicitly. Most of the languages specifies the callback method by passing the address of the subroutine to the system to the request is calling back from, But java performs the same thing by using interfaces. Java does not allow passing the address of subroutine but allows passing an instance of a class that implements the standard interface. For this purpose anonymous classes are mainly used as they support a better compact definition of the class that is required as a new class.
One more example of callback methods is ejbCreate method that is used by an ejb container to create a ejb bean - the developer does not call it explicitly in code- the container calls it- although the developer can override it- or put stuff in it...
Callback methods have totally different meaning regarding the context of security. In order to login securely call the server which then calls us back. This makes it harder for you to spoof being someone else. This may be done over phone lines or over the Internet. It is the same scheme a jealous husband might use to ensure his wife is really home as she claims.
http://www.roseindia.net/help/java/c/callback-methods.shtml