How to install management agent in remote host ?
/******* at first set registration password *******/
1. Open OEM console .
2. Go to setup.
3. Go to registration password.
4. Set a password.
/******** Install management agent in remote machine ************/
1. Edit c:\windows\system32\drivers\ext\host add management server host name & Ip address.
2. Start oracle universal installer then select install management agent.
3. Select Home directry for management agent then next.
4. Chose management service host name and port no then select next.
5. Give the registration password created above then select next.
6. After completing installation select exit.
/**********End*************************/
Wednesday, July 15, 2009
Free stock photography resources
Are you looking for free or almost free stock photography? Your first stop should be Blue Vertigo, a nicely designed site that offers long lists of sites where you can find free or cheap stock photos. But that's not all. Use the horizontal scroll bar to discover resources for lots of other things, from Photoshop Brushes to free fonts to Poser downloads. It's a little bit of heaven.
Tuesday, July 14, 2009
Can a single POJO class in Hibernate be mapped to multiple tables?
Question:Can a single POJO in Hibernate be mapped to multiple tables?
Ans: Yes a single POJO can be mapped to multiple tables.
Hibernate provides an easy way to do this.
Suppose we have an AccountDTO class and an AccountPOJO which needs to be mapped to two different tables
1)User_account 2)Admin_account
Here is the AccountDTO:
public class AccountDTO{
private int id;
private String login;
private String password:
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getLogin() {
return login;
}
public void setLogin(String login) {
this.login = login;
}
public int getID() {
return id;
}
public void setID(int clientID) {
this.id = clientID;
}
}
Here is the AccountPOJO :
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping package="com.digitalk.dto">
<class entity-name="User" table="User_account" name="AccountDTO">
<id name="id" type="integer" column="ID">
<generator class="increment"></generator>
</id>
<property name="login" type="string" column="LOGIN"></property>
<property name="password" type="string" column="PASSWORD"></property>
</class>
<class entity-name="Admin" table="Admin_account" name="AccountDTO">
<id name="id" type="integer" column="ID">
<generator class="increment"></generator>
</id>
<property name="login" type="string" column="LOGIN"></property>
<property name="password" type="string" column="PASSWORD"></property>
</class>
</hibernate-mapping>
(A) From the AccountPOJO you can see that this single POJO is mapped to two different tables
1)User_account 2)Admin_account
Now when you want to save the instance of the AccountDTO class in User_account table
then do the following steps:
1)create an instance of AccountDTO class
AccountDTO account=new AccountDTO();
2)set the properties.
3)create a hibernate session
4) Then save the object as
session.save("User",account);
(B)Now if you want to save the AccountDTO instance to Admin_account table then do the following:
1)create an instance of AccountDTO class
AccountDTO account=new AccountDTO();
2)set the properties.
3)create a hibernate session
4) Then save the object as
session.save("Admin",account);
From above you can see the only difference is in step 4
i.e you have to use entity-name instead of class name.
Similarly you can perform update,delete ond other operation using entity-name.
Ans: Yes a single POJO can be mapped to multiple tables.
Hibernate provides an easy way to do this.
Suppose we have an AccountDTO class and an AccountPOJO which needs to be mapped to two different tables
1)User_account 2)Admin_account
Here is the AccountDTO:
public class AccountDTO{
private int id;
private String login;
private String password:
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getLogin() {
return login;
}
public void setLogin(String login) {
this.login = login;
}
public int getID() {
return id;
}
public void setID(int clientID) {
this.id = clientID;
}
}
Here is the AccountPOJO :
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping package="com.digitalk.dto">
<class entity-name="User" table="User_account" name="AccountDTO">
<id name="id" type="integer" column="ID">
<generator class="increment"></generator>
</id>
<property name="login" type="string" column="LOGIN"></property>
<property name="password" type="string" column="PASSWORD"></property>
</class>
<class entity-name="Admin" table="Admin_account" name="AccountDTO">
<id name="id" type="integer" column="ID">
<generator class="increment"></generator>
</id>
<property name="login" type="string" column="LOGIN"></property>
<property name="password" type="string" column="PASSWORD"></property>
</class>
</hibernate-mapping>
(A) From the AccountPOJO you can see that this single POJO is mapped to two different tables
1)User_account 2)Admin_account
Now when you want to save the instance of the AccountDTO class in User_account table
then do the following steps:
1)create an instance of AccountDTO class
AccountDTO account=new AccountDTO();
2)set the properties.
3)create a hibernate session
4) Then save the object as
session.save("User",account);
(B)Now if you want to save the AccountDTO instance to Admin_account table then do the following:
1)create an instance of AccountDTO class
AccountDTO account=new AccountDTO();
2)set the properties.
3)create a hibernate session
4) Then save the object as
session.save("Admin",account);
From above you can see the only difference is in step 4
i.e you have to use entity-name instead of class name.
Similarly you can perform update,delete ond other operation using entity-name.
Monday, July 13, 2009
Thursday, July 2, 2009
Confiruing your Mac to use a static IP with Airport Express
This will show how you can manually assign a static ip to your mac using with AE.
Assuming you have configured a wireless network with your AE already, follow these steps. Mind you while creating this AE wireless network, you have to enter the static ip, subnet mask and Gateway information as provided by your ISP.
1. Open System Preference and then Network.
2. In the TCP/IP tab, Configure Ipv4, select Manually.
3. Enter a IPv4 address of your choice. Generally, I assign a very high IP such as 10.0.1.220
4. Subnet mask: 255.255.255.0
5. Router: 10.0.1.1 (your AE's default address)
6. Click the DNS tab and add a DNS server as 10.0.1.1 (your AE's default address).
7. Click OK and save the configuration.
Bingo!! off you go.
Monday, May 4, 2009
Integrating Blog with your home page
1. First you’ll need to create a gmail account for Blogspot.
Blogspot provide you to create free blog.
2. Through blogger (Blogger is a free blog publishing tool from Google for easily
sharing your thoughts with the world. Blogger makes it simple to post text, photos and video)
3. Next log into blogger and select the ‘Settings’ tab and then select ‘publishing’ from the sub menu.
4. After complete the Customization you will get the web address of your rss feed.
5. Now build your code from (www.tanjabaumann.com) and create your own javascript RSS feed.
6. Finally you paste your javascript code in your html page on blog display area.
Blogspot provide you to create free blog.
2. Through blogger (Blogger is a free blog publishing tool from Google for easily
sharing your thoughts with the world. Blogger makes it simple to post text, photos and video)
3. Next log into blogger and select the ‘Settings’ tab and then select ‘publishing’ from the sub menu.
4. After complete the Customization you will get the web address of your rss feed.
5. Now build your code from (www.tanjabaumann.com) and create your own javascript RSS feed.
6. Finally you paste your javascript code in your html page on blog display area.
Friday, April 17, 2009
Echo2 Article
Samudra has published an article on Echo2 AJAX framework. Here is the link-
Echo2: Turn Java into AJAX Without Touching JavaScript or JSP: http://www.devx.com/Java/Article/41356
Subscribe to:
Posts (Atom)