WebLogic Installation And Configuration

To install/add JRE Follow below Steps
  • Install the software
  • After complete installation, a BEA folder appears in windows Start.
    Select Configuration wizard from this, to create your own domain
  • Then go through these steps:


  • Give username and password for your domain.


  • Up to these Domain creation is over.
  • For starting your Domain server go to your domain location. Which is available in c:\bea\user_projects\domains
  • -----------------After Server started you get your browser window listening at port 7001 as
  • ------------After Log In , WebLogic index page will appears as
  • Then we go for making our connection pool
    For that we have to go as Services------JDBC-------Data Source (in right panel)
  • Select New For creating new Pool and follow below steps:
  • ---------Give any name and JNDI Name you want
  • ------MYDB as my connection pool is created.
  • ------To use this connection in your pool get below code
  • import java.util.*;
    							import java.sql.*;
    							import javax.sql.*;
    							import javax.naming.*;
    
    							class CPM
    								{
    							public static void main(String as[])
    							{
    							int id=0;
    							String uname=null;
    							try{
    							Properties p=new Properties();
    							p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    							p.put(Context.PROVIDER_URL,"t3://localhost:7001");
    							Context ctx=new InitialContext(p);
    							Object o=ctx.lookup("JNDI/MYDB");
    							DataSource ds=(DataSource)o;
    							Connection con=ds.getConnection();
    							Statement st=con.createStatement();
    							ResultSet rs=st.executeQuery("select * from users");
    							while(rs.next())
    								{
    							id=rs.getInt(1);
    							uname=rs.getString(2);
    							System.out.println(""+id+"..."+uname);
    									}
    							rs.close();
    							st.close();
    							con.close();
    							}catch(Exception e)
    								{
    							System.out.println(e);
    								}
    									}
    									}
    							
  • Press Lock & Edit Button to modify in it
  • Click on install to install your project
  • ------Select .war file folder location
  • After finishing installation your project will appear in deployment window. From there you start and stop your application
  • After Start of your application, you are ready to enjoy your application
  • Install plug-in for weblogic server
  • Configure your server.
    Now, you are ready to work with WEBLOGIC server