The Ultimate Guide to Liferay DXP Performance Tuning: Speed Up Your Portal In the enterprise web space, milliseconds equal millions. Whether you are running a B2B commerce storefront, a customer support portal, or an employee intranet on Liferay DXP, slow load times will devastate your user experience and destroy your SEO rankings. Out of the box, Liferay is configured to run on almost any machine. This means its default settings are highly conservative to ensure compatibility, not maximum performance. If you are launching a production environment without tuning your server, you are leaving massive amounts of speed and scalability on the table. In this comprehensive, deep-dive guide, we are going to explore the critical layers of Liferay performance tuning. We will cover backend Java Virtual Machine (JVM) configuration, Database Connection Pooling, Elasticsearch optimization, and Frontend caching strategies. By the end of this guide, you will have a blazing-fast, enterprise-grade...
Crud Operation on Vaadin portlet
Lets connect vaadin portlet with mysql database :put poretal-ext.properties file under class file with following code
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost:3306/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=root
// this code will write under
public class DemoVaadinApplication extends Application {
String dbUrl = "jdbc:mysql:///lportal";
String dbClass = "com.mysql.jdbc.Driver";
Connection con = DriverManager.getConnection(dbUrl, "root","root");
How to insert data into mysql database table
Here are complete code for inserting data into vadin table
public class DemoVaadinApplication extends Application {
String dbtime;
String dbUrl = "jdbc:mysql:///lportal";
String dbClass = "com.mysql.jdbc.Driver";
@Override
public void init() {
final Window window = new Window();
final TextBox md=new TextBox(“Name”);
final TextBox name=new TextBox(“Fname”);
public void buttonClick(ClickEvent event) {
try {
String valu=(String)md.getValue();
String valu1=(String)name.getValue();
try {
Connection con1 = DriverManager.getConnection(dbUrl, "root","root");
System.out.println("Hi this is insert query:");
Statement st=con1.createStatement();
String mda="insert into vadin(name,fname)values('"+valu+"','"+valu1+"')";
int i=st.executeUpdate(mda);
if(i!=0)
{
System.out.println("Data is inserted");
}
else
{
System.out.println("Faile");
}
//qcSQL1.close();
}
catch(SQLException e) {
e.printStackTrace();
}
System.out.println("Click event value"+valu);
} catch (Exception e) {
// Ignored, we'll let the Form handle the errors
}
}
});
window.addComponent(save);
}
}
Comments
Post a Comment