Malli Raman

Ranch Hand
+ Follow
since Nov 07, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Malli Raman

How the server push or comet is working. Since my customer is not interested in going for opensources(icefaces), is there any way can we implement the comet / server push functionality.

Thanks in advance.
when creating a new realm in weblogic and after configuring all providers and try to start up the following error occurs

<4-Dec-2007 5:13:18 o'clock PM GMT+05:30> <Notice> <Security> <BEA-090082>

<4-Dec-2007 5:13:18 o'clock PM GMT+05:30> <Critical> <Security> <BEA-090402> <Au
thentication denied: Boot identity not valid; The user name and/or password from
the boot identity file (boot.properties) is not valid. The boot identity may ha
ve been changed since the boot identity file was created. Please edit and update
the boot identity file with the proper values of username and password. The fir
st time the updated boot identity file is used to start the server, these new va
lues are encrypted.>
<4-Dec-2007 5:13:18 o'clock PM GMT+05:30> <Critical> <WebLogicServer> <BEA-00038
6> <Server subsystem failed. Reason: weblogic.security.SecurityInitializationExc
eption: Authentication denied: Boot identity not valid; The user name and/or pas
sword from the boot identity file (boot.properties) is not valid. The boot ident
ity may have been changed since the boot identity file was created. Please edit
and update the boot identity file with the proper values of username and passwor
d. The first time the updated boot identity file is used to start the server, th
ese new values are encrypted.
weblogic.security.SecurityInitializationException: Authentication denied: Boot i
dentity not valid; The user name and/or password from the boot identity file (bo
ot.properties) is not valid. The boot identity may have been changed since the b
oot identity file was created. Please edit and update the boot identity file wit
h the proper values of username and password. The first time the updated boot id
entity file is used to start the server, these new values are encrypted.
at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.do
BootAuthorization(CommonSecurityServiceManagerDelegateImpl.java:941)
at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.in
itialize(CommonSecurityServiceManagerDelegateImpl.java:1029)
at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
erviceManager.java:849)
at weblogic.security.SecurityService.start(SecurityService.java:141)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
Truncated. see log file for complete stacktrace
>
<4-Dec-2007 5:13:18 o'clock PM GMT+05:30> <Notice> <WebLogicServer> <BEA-000365>
<Server state changed to FAILED>
<4-Dec-2007 5:13:18 o'clock PM GMT+05:30> <Error> <WebLogicServer> <BEA-000383>
<A critical service failed. The server will shut itself down>
<4-Dec-2007 5:13:18 o'clock PM GMT+05:30> <Notice> <WebLogicServer> <BEA-000365>
<Server state changed to FORCE_SHUTTING_DOWN>

tried changing the boot properties and still not starting
please provide your inputs or suggestions
12 years ago

Originally posted by Malli Raman:

No exception or error. The program simply completes the execution.

Is it do I need to check with the configuration file

Thanks,
M.S.Raman



I got the answer. I need to commit the transaction. earlier I thought that session.flush() by default will commit the transaction. Once I added session.connection().commit() the transaction gets commited.

Thanks,
M.S.Raman

Originally posted by Scott Johnson:
What is the exception message and stacktrace?


No exception or error. The program simply completes the execution.

Is it do I need to check with the configuration file

Thanks,
M.S.Raman
Hi,

I am just started using hibernate. I am able to retrieve the hibernate data from the database but failing to insert the same to the table. Please let me know the mistake I have made!

CD.java

CD cd1 = new CD("Music1","artist1",new Date(),9.99);
CD cd2 = new CD("Music2","artist2",new Date(),9.99);

Configuration cfg = new Configuration().addClass(CD.class);
/*
Properties properties = cfg.getProperties();
Enumeration enum = properties.keys();
String key = null;
while(enum.hasMoreElements())
{
key =(String)enum.nextElement();
System.out.println( key +"---->"+ properties.getProperty(key) );
}
*/
SessionFactory sessionFactory = cfg.buildSessionFactory();
Session session = sessionFactory.openSession();
session.beginTransaction();
session.save(cd1);
session.save(cd2);
session.flush();


<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">;

<hibernate-configuration>
<session-factory>
<property name="show_sql">true</property>
<mapping resource="CD.hbm.xml"/>
</session-factory>
</hibernate-configuration>
---------------------------------------------

import java.io.*;
import java.util.*;

public class CD implements Serializable{
int id;
String title;
String artist;
Date purchasedate;
double cost;


public CD()
{
}

public CD(String title, String artist, Date purchaseDate, double cost)
{
this.title = title;
this.artist= artist;
this.purchasedate=purchaseDate;
this.cost = cost;
}

public void setId(int id)
{
this.id = id;
}

public int getId()
{
return id;
}

public void setTitle(String title)
{
this.title = title;
}

public String getTitle()
{
return title;
}

public void setArtist(String artist)
{
this.artist = artist;
}

public String getArtist()
{
return artist;
}

public void setPurchasedate(Date purchasedate)
{
this.purchasedate = purchasedate;
}

public Date getPurchasedate()
{
return purchasedate;
}

public void setCost(double cost)
{
this.cost = cost;
}

public double getCost()
{
return cost;
}

public void print()
{
//System.out.println("CD Id -->"+ id);
System.out.println("CD Title -->"+ title);
System.out.println("CD Artist -->"+ artist);
System.out.println("CD Date -->"+ purchasedate);
System.out.println("CD Cost -->"+ cost);
}

}
You can do this in a session bean +[optionally with two entity beans].

Originally posted by kri shan:
How Statefull session Bean is better than Servlets Session?



I think both are working in different context but for the same purpose as session tracking.

In the servlet session you have to store all the values explicitly but in SFSB the container does the job for you.

Using SFSB will hit the performance as one SFSB is attached with one client.

If your appln uses the servlet & SFSB then store the values in serlvet session instead of SFSB.

Originally posted by Abhishek Asthana:
Hi,
I am having a little doubt about design of my Application and I need your help.
I am planning to use MVC architecture and I am thinking of having an EJB/Servlet/JSP trio for each page. Actually I want to display data from database on each page. For this I am thinking of using a different servlet passing arguments to its respective EJB which accesses database and sends the results back. But my Instructor says that there should be one servlet that should act as controller.
Please tell me what should I do? Is it such that in MVC there ought to be only one servlet throughout?
Abhishek



There is one advantage of using single servlet instead of multi servlets is that you don't need repeat the same logic in all servlets. Use servlet mapping for implementing this.


Suppose :
http://localhost:8080/mycontext/MyServlet/ExtraPathInfo
Where "MyServlet" is the actual servlet.

How can I get the Extra Path Info ?



Use request.getPathInfo()..
15 years ago

Originally posted by kri shan:
What is the difference between Data Source and Transaction Data Source?



If you want to use two phase commit (2PC) then Transaction Data Source need to be used.

If you are using small application which used only single database transaction then go for Data Source.

Please correct me if I am wrong.

Originally posted by kri shan:
Whether JMS supports RMI synchronous communication?



Hi,

JMS Request/Response method is used for RMI Synchronous communication.

Originally posted by David Harkness:
I read your question as "Why make a session bean stateful if it doesn't maintain any state?" The answer is "Insanity."

Use stateful session beans only when you must maintain state for the client in the bean itself. Many times you can simply pass in the state (which the client maintains) as parameters to a stateless session bean.



Hi David,

I just want to make sure that the answer is correct
Instance variables are used to store the values between method invocation in the stateful session bean. If there is no variable then what is the use of declaring the bean as stateful?

Originally posted by Valentin Tanase:
One way is to use application resource files. Having a file named jndi.properties that defines all properties required to build the initial context will help achieving the location transparency. This file must be located in the application's classpath or it might be located under the $JAVA_HOME/lib folder. Another way is to use an IoC container like PicoContainer or Spring framework that does that job for you.
Regards.



Hi,
I tried this and it is working fine. By doing this way I can say that the client don't require to hardcode the "provider_url" in the code to get the initial context.

Now it brings me another question. In the jndi.properties file you are mentioning the Provider URL to locate the context. Fine, If that is the case how will you say that it is location transparent to the client since the client knows the Provider URL in his $java_home/lib folder. Also whether the client can able to speak with two different context at the same time?

Originally posted by Gurumurthy Ramamurthy:
Hi,

We are having an instance of entity bean which is doing some transactions with a piece of data from DB. What happens when you delete that specific data (on which the entity bean instance is working) is removed externally from the DB?

Thanks,
Guru



It is similar to one user deletes the record while another user is trying to read the data.