Wednesday, August 18, 2010
Who is an Architect
Enterprise Architecture when defined from an information and technology perspective explicitly describes an organization through a set of independent, non-redundant artifacts, defining how these artifacts interrelate with each other, and developing a set of prioritized, aligned initiatives and road maps to understand the organization, communicate this understanding to stakeholders, and move the organization forward to its desired state.
From a Business perspective, Enterprise Architecture illuminates how an organization and all of its members can achieve its objectives, through the creation of a series of engineered models and project initiatives, that can be easily understood by all of the people associated with the organization.
If an individuals contribution is to just about talk on these artifacts (or even worse BS on those) and not work towards creating them, please stop calling yourself an Enterprise Architect. May be they can be called as "Art Vandelay" Architect as in one of SeinField's episode.
Monday, August 9, 2010
Websphere JNDI resource scoping
Interestingly this wasn't true. Even though IBM marks resources created at cell level with broader scope, when it comes to connections each node gets its own share. Despite the scope of a defined resource, the resource properties apply at an individual server level only.The application scope has precedence over all the scopes.
- The server scope has precedence over the node and cell scopes.
- The node scope has precedence over the cell scope.
For example, if you define the scope of a data source at the cell level, all the users in that cell can look up and use that data source, which is unique within that cell. However, resource property settings are local to each server in the cell. For example, if you define the maximum connections as 10, then each server in that cell can have 10 connections.
The cell scope is the most general scope and does not override any other scope. The recommendation is that you generally specify a more specific scope than the cell scope. When you define a resource at a more specific scope, you provide greater isolation for the resource. When you define a resource at a more general scope, you provide less isolation. Greater exposure to cross-application conflicts occur for a resource that you define at a more general scope.
Saturday, August 7, 2010
MDB controller
I came across a requirement to fetch messages dropped into the queue only at defined intervals and not just when message was available. Websphere JMX AdminService API exposes provides operations that can interrogate available J2CMessage bindings and issue commands to either pause, resume the endpoint listeners. One caveat though is these activation specs need to be initialized within your application for AdminService to look them up. In other words, if you have multiple EAR's encapsulated with MDB's and if you wish to control them centrally through another EAR (all deployed on same cell), you will not be able to passivate without them being activated first.
String endPointlistener = "*:*,type=J2CMessageEndpoint";
javax.management.ObjectName queryName =
new javax.management.ObjectName( endPointlistener);
AdminService adminService = AdminServiceFactory.getAdminService();
Set s = adminService.queryNames(queryName, null);
Iterator it = s.iterator();
List mbeans = new ArrayList();
while (it.hasNext()) {
ObjectName mBean = (ObjectName) it.next();
result = adminService.invoke(mBean, operationName, params,
signature);
}
Wednesday, August 4, 2010
Dynamic JCA Connection Factory Substitution
In websphere you can set custom properties using the prefix "CP"
For example, to you may have a Connection factory marked against a file resource adapter, with JNDI com/eis/myFileCF dedicated for I/O write operations. Supposing, there are many folders that are operated by certain users who have privilige to delete while others have only write access it may become a daunting task to create dedicated connection factories to isolate these set of users. Instead application developers can lookup the connection factory by JNDI and inject any property variances such as username and password, in this case, like
conn.setProperty("CPuserName", "user");
conn.setProperty("CPpassword", "{xor}49dksdldk");
Note, the password is masked using xor alogrithm. Websphere encodes J2C credentials while saving into file system and later decodes when sending them out to appropriate endpoints; your dynamic injection should encode the same way for proper processing.