1. There is no need to initialize static variable because by default it set variable value to zero, but when you use "final" keyword with static then you must have to initialize that variable with value, otherwise you will get compile time error
2. Only a class whose definition is complete can be declared as final, once you declare any class as final den after you cant be extend this class or you cant override any method also.
3. you cant instantiate class which is declared as abstract type
4. Final variable are known as "blank final variable" and "named constant"
5. abstract and final will never work together.
6. You cant declare transient variable inside methods
7. Sometime, Java used to cache variable value in the memory for efficiency purpose, which is not correct in the case of multi-threading. To avoid jvm to store variable value in the cache we can use "volatile" keyword.
8. You can not use final and volatile both at same time.
9. VirtualMachineError, LinkageError are going to handel by "Error" class
10. Each assetions contains boolean expression , if its reutn true when assertion is executed. if its return false, the system throws a special assertion type exceptions.
Wednesday, August 27, 2008
Where to find wsdl.exe file?
Easy :)
It will be at %HOME_DIR_OF_VISUALSTUDIO_INSTALLATION%\SDK\V2.0\BIN
It will be at %HOME_DIR_OF_VISUALSTUDIO_INSTALLATION%\SDK\V2.0\BIN
Creating a Stored Procedure
You can create stored procedures using the CREATE PROCEDURE Transact-SQL statement. Before creating a stored procedure, consider that:
-> CREATE PROCEDURE statements cannot be combined with other SQL statements in a single batch.
-> Permission to create stored procedures defaults to the database owner, who can transfer it to other users.
-> Stored procedures are database objects, and their names must follow the rules for identifiers.
-> You can create a stored procedure only in the current database.
-> When creating a stored procedure, you should specify:
-> Any input parameters and output parameters to the calling procedure or batch.
-> The programming statements that perform operations in the database, including calling other procedures.
-> The status value returned to the calling procedure or batch to indicate success or failure (and the reason for failure).
System Stored Procedures
Many of your administrative activities in Microsoft® SQL Server™ 2000 are performed through a special kind of procedure known as a system stored procedure. System stored procedures are created and stored in the master database and have the sp_ prefix. System stored procedures can be executed from any database without having to qualify the stored procedure name fully using the database name master.
It is strongly recommended that you do not create any stored procedures using sp_ as a prefix. SQL Server always looks for a stored procedure beginning with sp_ in this order:
-> The stored procedure in the master database.
-> The stored procedure based on any qualifiers provided (database name or owner).
-> The stored procedure using dbo as the owner, if one is not specified.
-> Therefore, although the user-created stored procedure prefixed with sp_ may exist in the current database, the master database is always checked first, even if the stored procedure is qualified with the database name.
Important: If any user-created stored procedure has the same name as a system stored procedure, the user-created stored procedure will never be executed.
Grouping
A procedure can be created with the same name as an existing stored procedure if it is given a different identification number, which allows the procedures to be grouped logically. Grouping procedures with the same name allows them to be deleted at the same time. Procedures used in the same application are often grouped this way. For example, the procedures used with the my_app application might be named my_proc;1, my_proc;2, and so on. Deleting my_proc deletes the entire group. After procedures have been grouped, individual procedures within the group cannot be deleted.
Temporary Stored Procedures
Private and global temporary stored procedures, analogous to temporary tables, can be created with the # and ## prefixes added to the procedure name. # denotes a local temporary stored procedure; ## denotes a global temporary stored procedure. These procedures do not exist after SQL Server is shut down.
Temporary stored procedures are useful when connecting to earlier versions of SQL Server that do not support the reuse of execution plans for Transact-SQL statements or batches. Applications connecting to SQL Server version 2000 should use the sp_executesql system stored procedure instead of temporary stored procedures. For more information, see Execution Plan Caching and Reuse.
Only the connection that created a local temporary procedure can execute it, and the procedure is automatically deleted when the connection is closed (when the user logs out of SQL Server).
Any connection can execute a global temporary stored procedure. A global temporary stored procedure exists until the connection used by the user who created the procedure is closed and any currently executing versions of the procedure by any other connections are completed. Once the connection that was used to create the procedure is closed, no further execution of the global temporary stored procedure is allowed. Only those connections that have already started executing the stored procedure are allowed to complete.
If a stored procedure not prefixed with # or ## is created directly in the tempdb database, the stored procedure is automatically deleted when SQL Server is shut down because tempdb is re-created every time SQL Server is started. Procedures created directly in tempdb exist even after the creating connection is terminated. As with any other object, permissions to execute the temporary stored procedure can be granted, denied, and revoked to other users.
-> CREATE PROCEDURE statements cannot be combined with other SQL statements in a single batch.
-> Permission to create stored procedures defaults to the database owner, who can transfer it to other users.
-> Stored procedures are database objects, and their names must follow the rules for identifiers.
-> You can create a stored procedure only in the current database.
-> When creating a stored procedure, you should specify:
-> Any input parameters and output parameters to the calling procedure or batch.
-> The programming statements that perform operations in the database, including calling other procedures.
-> The status value returned to the calling procedure or batch to indicate success or failure (and the reason for failure).
System Stored Procedures
Many of your administrative activities in Microsoft® SQL Server™ 2000 are performed through a special kind of procedure known as a system stored procedure. System stored procedures are created and stored in the master database and have the sp_ prefix. System stored procedures can be executed from any database without having to qualify the stored procedure name fully using the database name master.
It is strongly recommended that you do not create any stored procedures using sp_ as a prefix. SQL Server always looks for a stored procedure beginning with sp_ in this order:
-> The stored procedure in the master database.
-> The stored procedure based on any qualifiers provided (database name or owner).
-> The stored procedure using dbo as the owner, if one is not specified.
-> Therefore, although the user-created stored procedure prefixed with sp_ may exist in the current database, the master database is always checked first, even if the stored procedure is qualified with the database name.
Important: If any user-created stored procedure has the same name as a system stored procedure, the user-created stored procedure will never be executed.
Grouping
A procedure can be created with the same name as an existing stored procedure if it is given a different identification number, which allows the procedures to be grouped logically. Grouping procedures with the same name allows them to be deleted at the same time. Procedures used in the same application are often grouped this way. For example, the procedures used with the my_app application might be named my_proc;1, my_proc;2, and so on. Deleting my_proc deletes the entire group. After procedures have been grouped, individual procedures within the group cannot be deleted.
Temporary Stored Procedures
Private and global temporary stored procedures, analogous to temporary tables, can be created with the # and ## prefixes added to the procedure name. # denotes a local temporary stored procedure; ## denotes a global temporary stored procedure. These procedures do not exist after SQL Server is shut down.
Temporary stored procedures are useful when connecting to earlier versions of SQL Server that do not support the reuse of execution plans for Transact-SQL statements or batches. Applications connecting to SQL Server version 2000 should use the sp_executesql system stored procedure instead of temporary stored procedures. For more information, see Execution Plan Caching and Reuse.
Only the connection that created a local temporary procedure can execute it, and the procedure is automatically deleted when the connection is closed (when the user logs out of SQL Server).
Any connection can execute a global temporary stored procedure. A global temporary stored procedure exists until the connection used by the user who created the procedure is closed and any currently executing versions of the procedure by any other connections are completed. Once the connection that was used to create the procedure is closed, no further execution of the global temporary stored procedure is allowed. Only those connections that have already started executing the stored procedure are allowed to complete.
If a stored procedure not prefixed with # or ## is created directly in the tempdb database, the stored procedure is automatically deleted when SQL Server is shut down because tempdb is re-created every time SQL Server is started. Procedures created directly in tempdb exist even after the creating connection is terminated. As with any other object, permissions to execute the temporary stored procedure can be granted, denied, and revoked to other users.
WSDL to Java using Eclipse
Hi Friends,
I have spent almost 3 hours to find a way to convert wsdl to java and finally I have done it hence i am sharing my findings with all of you so atleast you can save your time.
1. Download eclipse if you do not have
2. Download org.apache.axis.wsdl2java.eclipse_1.1.0.1.zip , extract it and put it under plugins directory of eclipse installation.
3. Download org.apache.axis_1.1.zip , extract it and put it under plugins directory of eclipse installation.
4. Select a file container in eclipse (folder), right click to get pop-up menu and select Import

5. The first page of the import wizard will appear on screen. Select the Import WebService reference

6.Follow the instruction and press finish button
I have spent almost 3 hours to find a way to convert wsdl to java and finally I have done it hence i am sharing my findings with all of you so atleast you can save your time.
1. Download eclipse if you do not have
2. Download org.apache.axis.wsdl2java.eclipse_1.1.0.1.zip , extract it and put it under plugins directory of eclipse installation.
3. Download org.apache.axis_1.1.zip , extract it and put it under plugins directory of eclipse installation.
4. Select a file container in eclipse (folder), right click to get pop-up menu and select Import

5. The first page of the import wizard will appear on screen. Select the Import WebService reference

6.Follow the instruction and press finish button
Subscribe to:
Comments (Atom)