What are the steps required to modify config.xml file of web logic server?The safest way to modify config.xml is to do it from the Web-logic server administration console. While doing from this also the things that has to be kept in mind is that: - Save a copy of the config.xml before making any modification to the original file. If there is any modification that causes error then it can prevent the web logic server also to start up. There is a possibility to revert back to the saved version of the file. - Manually editing of the config.xml file, for a particular domain when, it is not active. If any changes are being made when the file is under use then those will be overwritten by the system. Any invalid XML or attribute value will be detected and the server won’t be able to boot. The information will be stored in this file.
|
What is the meaning of ClassFormatErrors used with the applet?ClassFormatErrors are used in the applet when the setup is not being properly set or the path to which the file is pointed is incorrect. <APPLET CODEBASE=http://your_server/webz/ns-home/classes CODE=applets.myapp.class> This happens due to change in the file format of CODEBASE in the Weblogic server. The Codebase tag should point to the HTTP server and not on the weblogic server. The path that is referenced by the CODEBASE tag is should not be the absolute directory path that is on the HTTP server and it should be configured properly to the Document root of the HTTP server. The above code should be changed with the code given below: <APPLET CODEBASE=http://your_server/classes CODE=applets.myapp.class>
|
What is the purpose of stub in web-logic server cluster?The purpose of the stub is to contain the object of the server and use it to connect it to the Web-logic server cluster. The cluster consists of more than one object that is residing on the server and consists of the replica of the object. The stub consists of the available server instances that is used to host the implementation of the objects and used to run the web-logic server as well. The stub also consists of the information that is related to loading of the server and load balancing of it. This load balancing allows the server to distribute the load among its host servers so that it never fails to provide data to the users.
|
What can happen when stub can’t to connect to web-logic server instances?In case of any failure that is occurring in the stub then the stub doesn’t have any information and it faces the difficulty to connect it to the web-logic servers also. The stub remains in connection with the server instances and allow it to be started during the booting of the system. The stub consists of the server instances list as well that allow the server to communicate with one another. If there are no servers that in communication then the stub uses DNS to find the running server and obtain the list of running instances of the server. The stub refreshes itself to obtain the list and take advantage of the new server that is attached to the cluster.
|
How does a server find out server unavailability?The web-logic servers use two different mechanisms to find out the unavailability of the servers. The servers that are unavailable won’t be having any use and it is a good practice to find out and neglect them.
These mechanisms are as follows: 1. Weblogic server instance gets stored in a cluster and uses multicast to broadcast the messages over the server and send a message to the main server for its availability. The main server monitors the messages of the server instances if any of the servers fails to respond. 2. Weblogic server monitors the errors that is corresponding to the socket on which the server is communicating and try to determine the availability from there. If the socket is open then the server sends the message to the main server and the communication happens. If there is no message and the socket gets closed unexpectedly then the server is assumed to be offline.
|
How are the notifications generated when a server is added to a cluster?The two mechanism of the server that it uses to find out the unavailability of the server, in the same way it uses the same mechanism to find out the new added server in the cluster. The web-logic server broadcasts a message to all the servers that are available and the servers in return respond to the message to show their availability to the server. If any new server is added then it also sends a message, a check is made to check the list of all the available server instances and if there is no result found then the server is made available in the list. There always remain stubs that monitor the cluster periodically and update the list of available server instances.
|
What are the ways in which the DNS request of failed servers handled?The DNS request is made to the failed servers also. When the main server send the request to all the servers to notify their availability then the client looks the server instance using the JNDI lookup and search by using the object reference. This allows the user to find out the new server instance and it will then be passed to the stub that monitors the cluster and the list of the clusters gets updated and it shows the availability of the servers as well. If the request is made to the server that is failed then it can be handled by using the third party load balancer like Resonate, BigIP, etc. These products are used to mask multiple addresses in a single address and return the result. This helps in keeping the track of all the servers.
|
What are the ways in which weblogic servers can run on multiple machines?There are various configurations that have to be made to make the weblogic server run on multiple machines. The methods that are involved have their advantages and disadvantages. The Web logic server consists of no built-in limit for the number of instances it can have in a cluster, but it can consists of larger number of instances if it is having multiple clustered systems. The web logic servers are best deployed to use more than one server instance at a time. Multiple machine can have one cluster each and have a synchronization method to increase the distribution of server instances.
|
What are the steps involved in setting up CLASSPATH in web logic server?The steps involved in setting up the CLASSPATH in web logic server are as follows: - Start the web logic server and open the setting option where the CLASSPATH is being mentioned. This includes the option of starting and stopping the web logic server. - Open the web logic distribution shell script and start the server. The script is located in the config directory and it is used to set up the CLASSPATH variable automatically as soon as the server script starts. - While compiling the application classes or using the web logic utilities, the CLASSPATH can be set and right entries can be made to the configuration file.
|
What are the databases that are available to be used with the Web logic J2EE connector architecture?There are two databases that can be used with the Web logic J2EE connector architecture and these databases are as follows: 1. Cloudscape database: This is the default database that is used with the architecture and this consists of the samples that contain the resource adapter representing the database system. The configuration of this is set in weblogic-ra.xml file that contains the cloudscape datasource. 2. Oracle database: The settings of cloudscape can be replaced by oracle settings. The resources that are provided consist of the JDBC support, hence it can use any database for which the resources can be configured and represented.
|
Where are the files placed while deploying the resource adapter in web logic server?The resource files are represented in CLASSPATH and the resource adapters are also mentioned there. The server instance includes the deployment of EJB and resource adapter in the form of .rar file format. The EJB consists of no dependencies as it is being written on the common client interface (CCI). EJB client is used to communicate with one another and it consists of message sending mechanism. EJB is having the parameter classes that are defined in .rar file format. EJB uses the class loaders also maintaining a hierarchy that is defined in the .rar specific class. When the instance is being passed as an argument to the EJB the application server de-serialize the object and sends the message to the servers of its deactivation.
|
What is the function of ManagedConnection.addConnectionEventListener() in web logic server?This function is used in EJB to call ConnectionFactory.getConnection() that connects to the EIS. It is a part of the Resource adapter and the application server. This is called to listen to an event that is taking place on the entire server whose data is present. This allows the connection to be established between the two servers and used to get the connection details for the new server. This function manages all the connections that are in the list and adds the connection whenever there is a requirement and the need.
|
How is the security handled in Web logic J2EE Connector Architecture?The security is quite strict when it comes to add new servers or update an existing one. The current configuration includes the information of all the connections that are established with the main server and it consists of the packaging requirements for the resource adapters in web logic servers. The server provides password protection and encryption method to increase the security of the overall standards. All the passwords are present in the file weblogic-ra.xml. The web logic server provides a converter tool that allows the information to be encrypted and made password protected. This converter tool is present in standard weblogic.jar file
|
What are the ways to avoid ResourceExceptions when sending requests for databaseconnections?/h2>The problem with the servers is to have few resources or the database connection in the connection pool to decrease the work load. The servers need to increase the maximum number of connections in the connection pool and utilize it to balance the overall load on the server. The server needs to be optimally designed to allow the connection pool to execute few threads and get the work done. The application should be designed to find out whether there are connections available or not. If there are connections available then it shows the message of NoResourceException. This is shown by the example: try { // your statement } catch(Exception handleEx) { // your statement } finally { try { conn.close(); } catch (Exception ignore){} // this returns the connection pool }
|
What is the purpose of using MultiPools in web logic server?The multi-pools are used to store the connection in 2 levels inside the pool and configure it accordingly. There are two ways in which the Multi-pools can be set up: 1. The multi-pool can be made as a backup if the connection to the database event fails. 2. The multi-pool can be setup as a load balancing server that will allow the server to give away some load to alternative server to balance the work and give higher performance. The multi-pools are used in the configuration of Web logic JDBC features and allow it to be chosen according to the requirements of the server from time to time.
|
How are multi-byte characters used with WebLogic jDriver?The multi-byte character sets are not supported by the Web logic jDriver that in turn used for the Informix driver. But, the support for it is added in the codeset of web logic jDriver. The multi-byte characters are used in a multi-user environment application. This gets confirmed first and a check is made to see whether the file is corrupted or not. The command that is used to check is bcheck or secheck. These come as a utility. If the files integrity is being verified then the table is being formed consisting of the data that is required by the client. A lock can be provided for the use of multi-byte characters in the database and the table.
|
What are the causes of having OCIW32.dll error in the database of web logic server?The following error OCIW32.dll is received while using the Oracle with JDBC driver. The error states that the dynamic library couldn’t be loaded in the system and this happens due to outdated OCIW32.dll driver that is residing the system. The program usually called as updater updates the program in the system directory and to installs it to run in the system. The error can be removed by removing the system directory. This is also due to the incompatibility of some drivers with the JDBC. The JDBC allows the connection of more than one database, so this might cause the error. eive this error.
|
What are the transaction isolation levels supported by WebLogic jDriver?The transaction isolation levels that are supported by the servlets application using the Oracle database include the BLOB fields. The web logic jDriver can be installed and used, but if due to some reason the code fails to execute then it shows an error message and also there are some levels in which the messages are divided and these are as follows: SET TRANSACTION ISOLATION LEVEL READ COMMITTED SET TRANSACTION ISOLATION LEVEL SERIALIZABLE The Oracle database supports only these two levels of isolation. When used with Web logic’s drivers it throws an exception for the drivers that are unsupported. There are some drivers that ignore the attempts to be set an unsupported isolation level.
|
What are the steps in which Unicode codesets can be set with the WebLogic jDriver?To allow the use of Unicode codesets certain changes has to be made within the web logic jDriver.
The following steps allow the setup to be done: 1. Install the appropriate codeset with the installation of Oracle. 2. Define the environment variable and NLS_LANG variable in the environment to allow the synchronization happen between the JDBC driver and Oracle supported drivers or the codesets. 3. Assign proper codeset to NLS_LANG in the shell of the WebLogic Server. 4. Restart the database services and server services to check whether everything got properly installed. When installed use it according to the requirements.
|
How can OS Authentication be connected with WebLogic jDriver for Oracle and Connection Pools?The purpose of OS authentication in connection pool is to use the UserIds of the user to start the appropriate web logic server. OS authentication is the operating system service that is allowed to authenticate the login information of the user. The database security is one of the issues for the web logic servers, so OS authentication is a necessary feature in operating systems. The connection pool and the database can be accessed if the client connection is established. Oracle uses the process of OS authentication while the accessing of the database. The JDBC driver of web logic allows only the user to take control over the databases.
|
What are the steps required to setup the Oracle instance for OS Authentication?To setup the Oracle instance of the OS Authentication feature. The steps that have to be followed are: 1. Open the INIT[sid].ORA file from the config directory of the web logic server. 2. Add the line OS_AUTHENT_PREFIX = OPS$ in the file INIT[sid].ORA file and as the statements are case sensitive so the statements should be written as it is. 3. Open the database of Oracle server by using the credentials of the SYSTEM. 4. Create a user using the name of OPS$userid, where userid is the name of operating system loginID. Grant the full privileges to the user for connection and using the resources on the server. 5. After setting up the connection with the made user then the Web logic jDriver for Oracle can be connected by using the “/” as the username property and “” as the password property. The example is given below:$ java utils.dbping ORACLE "/" "" userserver Properties props = new Properties(); props.put("user", "/"); props.put("password", ""); props.put("server", "userserver"); Class.forName("weblogic.jdbc.oci.Driver").newInstance(); Connection conn = myDriver.connect("jdbc:weblogic:oracle",props);
|
Write a program of web logic server to get the connection pool attribute?The connection pool attribute can be accessed using the administrative console of the connection pool. This includes the Web logic jDriver for Oracle and JDBC connection pool configuration for setting up the attribute for overall server system. The example that is given below show the attribute that is been accessed in the web logic server: <JDBCConnectionPool Name="userPool" Targets= “userserver,server1" DriverName="weblogic.jdbc.oci.Driver" InitialCapacity="1" MaxCapacity="10" CapacityIncrement="2" Properties="databaseName=userOracleDB"
|
What type of object is returned by ResultSet.getObject()?Web logic jDriver for Oracle returns a Java object that includes the data and the information for retrieval.
The object that is returned from ResultSet.getObject() is as follows: - A double is returned for the column types of Number(n) and Number(m,n). If the precision that is defined is not accurate then it can be represented by using the BigDecimal as well. - If the column type is a NUMBER then the Java type that has to be returned based on the actual value of each row. The values in this type may vary from one row to another row. These are the type of objects that are returned by using the data variables in the Web logic server.
|
Write a program to call the store procedure of Oracle that takes no parameter?The stored procedure are the procedures that is called when a function need to use some internal variables. These variables are used to access the relational database system and used to play a big role in web logic server. The code that is given below shows the same: CallableStatement cstmt = conn.prepareCall("Begin procName; END;"); cstmt.execute(); //procName is the name of an Oracle stored procedure. //The above statement is the standard oracle statement that works with the Oracle DBMS. // The following syntax given below will call the stored procedure. CallableStatement cstmt = conn.prepareCall("{call procName};"); cstmt.execute(); // This is the syntax which will work with all the database system.
|
Write a program to bind string values in a PreparedStatement?The PreparedStatement class allow to bind the string values in the class. The setString() method that can be used with it won’t work due to incompatibility. The example shows the usage of the PreparedStatement: String pstmt = "select n_name from n_table where n_name LIKE '?%'"; PreparedStatement ps = conn.prepareStatement(pstmt); ps.setString(1, "Rohit"); ResultSet rs = ps.executeQuery(); This PreparedStatement doesn’t work due to the fact that the value needs to be specified in a string and not be embedded in quotes. The corrected statement that gets executed is as follows: String matchvalue = "rohit%"; String pstmt = "select n_name from n_table where n_name LIKE ?"; PreparedStatement ps = conn.prepareStatement(pstmt); ps.setString(1, matchvalue); ResultSet rs = ps.executeQuery();
|
What is the purpose of T3 in WebLogic Server?T3 provides a framework for WebLogic Server messages this includes the necessary support for the enhancements of the services that needs to be given. T3 framework includes certain features like object replacement and tunneling concept used in the clustering of the web logic servers. T3 uses Java Object Serialization and RMI, to provide the object and communication from one server to another server remotely. T3 is a framework that connects the web logic server with the programmatic clients. T3 uses protocols such as HTTP and IIOP to communicate between the processes and web logic servers.
|
What is the local interface used by web logic server?EJB is used with the web logic server and provides the mechanism of remote method invocation using the JAVA API’s. The support is extended to CORBA that is used to transport these remote calls using RMI/IIOP protocols. This interface provided flexibility and performance by increasing the development of the application. EJB supports the local interface mechanism to allow streamlined calls to the bean if a caller is in the same container. This doesn’t include any overhead that is usually involved with RMI when using the marshalling feature. The interfaces provide the foundation for the container managed relationships between the entity beans.
|
What are the steps involved in configuring the JMS?- Start web logic server and go to console. - Select JMS, to configure anything create a store and create a new JMS file. - Create a new connection and add it to the JDBC connection pool. - Select the target server. Select the template that needs to be applied on the JMS. - Select a server or create a new JMSServer, this server will consist of the JMS that will be booted when the system or the server will be turned on. - Create destinations in which the query from the JMS server will get stored. - Create connection factories by typing in the name and JNDI name. The targets can be selected from here to deploy the connection factory.
|
What is the procedure to configure JMS security?Open the web logic server console and select ACLs in the tree view. To configure the JMS security there is a need to create a control list. The procedure is as follows: 1. Set ACL name like weblogic.jms.queue.QUEUENAME or weblogic.jms.topic.TOPICNAME. 2. Create it with new permission that include send and receive permissions. 3. Create users of groups list and set the permissions for it. Save the changes of implementation and exit. The procedure will update the fileRealm.properties file with the statements given below: acl.send.weblogic.jms.queue.myQueue=user acl.receive.weblogic.jms.queue.myQueue1=user
|
How can third-party JDBC driver be used with JMS?Web logic server supports the JDBC drivers that are included and with other databases as well. The JDBC drivers if not present then the JMS has to be created manually. If it is present then it just has to be included. The files that are used having .ddl extension that is located in weblogic/jms/ddl directory of the weblogic.jar file and this can be used as a template. The jar utility that is supplied can be extracted with JDK using the following command: jar xf weblogic.jar weblogic/jms/ddl After the extraction the drivers gets copied to the specified location and then they can be inserted in the application by going the console. This will automatically create the database tables for the JDBC store. This is easier to configure and provide better performance in compare to other methods.
|