Monday, April 24, 2006

Windows XP : To find services associated to OS process

Was finding a lot of svchost.exe process getting lauched. To find out the services for each of the scvhost process, following command was helpful.
D:\>tasklist /svc

Image Name PID Services
========================= ====== =============================================
System Idle Process 0 N/A
System 4 N/A
smss.exe 820 N/A
csrss.exe 892 N/A
winlogon.exe 920 N/A
services.exe 976 Eventlog, PlugPlay
lsass.exe 988 Netlogon, PolicyAgent, ProtectedStorage,
SamSs
svchost.exe 1152 DcomLaunch, TermService
svchost.exe 1240 RpcSs
svchost.exe 1376 AudioSrv, CryptSvc, Dhcp, dmserver, ERSvc,
EventSystem, helpsvc, HidServ, lanmanserver,
lanmanworkstation, Messenger, Netman, Nla,
Schedule, seclogon, SENS, SharedAccess,
ShellHWDetection, Themes, TrkWks, W32Time,
winmgmt, wuauserv, WZCSVC
svchost.exe 1428 Dnscache
svchost.exe 1616 LmHosts, RemoteRegistry, SSDPSRV, WebClient
spoolsv.exe 1784 Spooler

Thursday, April 20, 2006

Managing state in SOA

A good link on managing state in SOA. Some of the key points:
1. To Manage conversation state, a state identifier needs to maintain following information w.r.t each request-response interaction
  1. Unique identifier of the Web service client

  2. Identifier of the Web service conversation originated for that client

  3. Identifier of the service request within that conversation

  4. Indicator of the conversation phase between the service requester (client) and service provider (Starting, Continuing, and Ending), which is used by the service for proper state maintenance

  5. Indicator of the interaction status between the service distribution function of the Web services infrastructure and the invocation interface (very helpful in dynamic invocations with late-binding of Web service interfaces)


2. This identifier information can be passed in three ways:
* Pass the identifier information as an extra parameter in the Web service method; the Web service interface can be designed to accept not only the XML document message, but also to accept additional parameters that represent the state identifier information.
* Pass the identifier information as a part of the XML document—the XML document can contain such information embedded within its body.
* Pass the identifier information in the SOAP message header.
3. First two methods are not preferred as code becomes harder to maintain.
4. Three-step development process:
1. Design and code the basic service components.
2. Develop SOAP message handlers.
3. Construct Web services (expose) out of developed J2EE components.
5. SOAP handlers are for: to handle the insertion of state qualifiers into the standard SOAP message definition. In JAX-RPC services, a handler is represented by a handler class that implements handleRequest() and handleResponse() methods for modifying the request and response message.
6. Create Handlers implementing javax.xml.rpc.handler.Handler and implementing the handleRequest method. The javax.xml.soap.SOAPMessage class is used by the handler to manipulate the SOAP message. A SOAPMessage object contains a SOAPPart object that contains the actual SOAP XML document and a SOAPEnvelope object that is "decomposed" to access SOAP body and header.
7. Get a SoapFactory instance and createElement using it. To the element addTextNode. Finally construct WS using handlers and deploy to AS.

Thursday, April 13, 2006

Checklist for buying flat from builder


  1. Original copy of your agreement with the builder

  2. 7/12 extract or property register card of the land under construction

  3. Index II extract of your agreement with the builder

  4. Copy of N.A.(Non Agricultural) permission for the land from the collector

  5. Search and title report (with the details of documents) for the last 30 years

  6. Development agreement between the owner of land and the builder

  7. Copy of order under the Urban land Ceiling Act

  8. Copy of building plans sanctioned by the competent authority

  9. Commencement certificate granted by Corporation / Nagar Palika

  10. Building completion certificate (if available)

  11. The latest receipts of taxes paid

  12. Partnership deed or memorandum of association of the builders firm

Wednesday, April 12, 2006

CheckList for purchasing new flat

1. Conveyance / Sale deed : Document by which the title of a property is conveyed by the seller to the purchaser
2. ULC [Urban Land (Ceiling & Regulation) Act] :
3. 7/12 extract is a document, which shows the names of the owners of the property. It contains details such as the Survey numbers, area, date from which the current owner's names were registered as owners. The 7/12 extract is issued by the Tehsildar or the concerned land authorities.
4. Index II - Index II is a document issued by the office of the Sub- Registrar of Assurances. It mainly mentions the names of the sellers & purchasers of a property for which the document is registered.
5. Search report & Title certificate - A Title certificate is issued by an advocate after conducting a search of the title of the property, which is intended to be purchased. The title certificate would state if the property is unencumbered and has a clear marketable title.(30 years)
6. Non Agricultural (N.A) permission --
7. Development Agreement : entered into by the builder with the landowner. It contains details regarding the terms and conditions on which the landowner has permitted development of his property. This is where the landowner engages a third party (i.e. the developer) to develop and build on their plot of land. This agreement is generally accompanied by a Power of Attorney in favour of the developer.
8. Approved building plans need to be checked necessarily. The plans must be approved by the Municipal Corporation/ Town Planning authority or other concerned authorities like CIDCO, MHADA, HUDCO, Gram Panchayat, etc. as applicable depending on the location of the project. Approved plan of the building along with the number of floors. Check if occupancy certificate has been issued by the municipality authority with the approved of Building Plan.
9. Commencement certificate is given by the Municipal Corporation permitting the developer to begin construction.
10. Completion/occupation certificate is given by the concerned authorities to the developer once the said building is complete in all respects and fit for occupation.
11. Stamp Duty & Registration:
12. Registration of an agreement
13. Approved layout plan
14. ownership documents. Check if the land on which the builder is building is his or he has undertaken an agreement with a landlord. If so, check the title of the land ownership with the help of an advocate.
15. Ensure that urban land ceiling NOC (if applicable) has been obtained or not.
16. NOC from water and electricity authorities also have to be obtained.
17. NOC from lift authorities.
18. Has your builder/promoter acquired the approvals from Municipal Corporation, Area Development Authorities, Electricity Boards, Water Supply & Sewerage Boards, Airport Area Authorities?
19. Ensure execution of proper sale agreements on your initial payments.
20. IOD (Intimation of disapproval)
21. Encumbrance certificate

Sunday, April 09, 2006

Purchasing a Flat

Some of the good links regarding the legalities when purchasing a flat.
HDFC
Hitesh
Sify
India infoline
MoneyControl

Saturday, April 08, 2006

Java : Widening, Boxing, Var-args

1. Widening wins over boxing and var-args
2. Boxing wins over var-args
3. Widening of reference variable depends on inheritance(so, Integer cannot be widened to Long. But, Integer widened to Number).
4. Widen and boxing is not possible
5. Boxing and widening is possible
6. var-args can be combined with either boxing or widening

java : order of execution

Following code and output to illustrate the order of execution of consutrctor, initialization blocks

class InitSuper{
InitSuper(int x){System.out.println("super: 1-arg const"); }
InitSuper() { System.out.println("super:no-arg const"); }
static { System.out.println("super:1st static init"); }
{ System.out.println("super:1st instance init"); }
{ System.out.println("super:2nd instance init"); }
static { System.out.println("super:2nd static init"); }
}

class Init extends InitSuper{
Init(int x) { System.out.println("1-arg const"); }
Init() { System.out.println("no-arg const"); }
static { System.out.println("1st static init"); }
{ System.out.println("1st instance init"); }
{ System.out.println("2nd instance init"); }
static { System.out.println("2nd static init"); }
public static void main(String [] args) {
new Init();
new Init(7);
}

Output
super:1st static init
super:2nd static init
1st static init
2nd static init
super:1st instance init
super:2nd instance init
super:no-arg const
1st instance init
2nd instance init
no-arg const
super:1st instance init
super:2nd instance init
super:no-arg const
1st instance init
2nd instance init
1-arg const

Thursday, April 06, 2006

Why is character # not considered to be a part of legal identifer for java compiler?

Why is the identifier e# not a legal identifier for java compiler? The rules for valid identifier given in K&B book are:
----------------------------------------------------------
1. Identifiers must start with a letter, a currency character ($), or a connecting character such as the underscore ( _ ). Identifiers cannot start with a number!
2. After the first character, identifiers can contain any combination of letters, currency characters, connecting characters, or numbers.
3. In practice, there is no limit to the number of characters an identifier can contain.
4. You can't use a Java keyword as an identifier. Table 1-1 lists all of the Java keywords including one new one for 5.0, enum.
5. Identifiers in Java are case-sensitive; foo and FOO are two different identifiers.
----------------------------------------------------------
Accordingly the identifer e# doesn't come in any of the above 5 category.
So, why is it not a legal identifier?

Replies:
1. I guess they forgot to add that any special characters other than the currency symbols are not allowed.

2. The # is not a letter! By letter we should consider A to z, I guess...