Posts
Enabling gzip Filter in Wildfly 14
- Get link
- X
- Other Apps
Enabling gzip Filter in Wildfly 14 By default, gzipfilter not implemented in wildfly 14, so we need to add configurations for enabling the same. When using predicate: exists['%{o,Content-Type}'] and regex[pattern='(?:application/javascript|application/resources|text/css|text/html|text/xml|application/json)(;.*)?', value=%{o,Content-Type}, full-match=true]
Multi / Parallel Threading in Java – using ExecutorService
- Get link
- X
- Other Apps
Case Scenario: Multiple request coming for inserting data into database in asynchronized way. Need to be ensure this request not making any bottleneck in database connection and that process usage (thread usage) under controllable. From below code snippet can understand how to implement the same in simple way, keep in mind that avoided persisting queuing system because only need to emboss parallel threading. Process Flow Process Flow Each Process Chanel class Each Process Chanel class Process Channels Handler Class Process Channels Handler Data Transferring POJO Class
How to call subclass method from superclass and assign superclass type into sub class by dynamically?
- Get link
- X
- Other Apps
Real Case Scenario There are two DTO classes which for transferring data having common properties. With these common properties need to do some business logics which cover more than 1000 lines of code and update the present DTO and return as result. Data receiving and sending from server in the form of above DTO and that can only predict at run time which DTO is this. Below structure using for implementing the same with maximum code reusability. Here only embossing how can call subclass method from superclass and ensure only accepting the POJO class which have common nature. In abstract class have comment which saying where need to add common logics, or call a common utility class. Class hierarchy Data sharing POJO class Code Snippet of POJO Class Super Class Code Snippet Specific C lasses (Subclasses) Test Run Class
Installing / Upgrading MySql 8 in Red Hat Linux / CentOS
- Get link
- X
- Other Apps
Step by step commands for installing or upgrading existing mysql 5.7 into 8.0. Here used CentOS and community server https://dev.mysql.com/downloads/mysql/ Download mysql mysql-8.0.12-1.el7.x86_64.rpm-bundle.tar Step 1 Sometimes there may some dependency error occurred when removing existing(here mysql 5.7) database. yum remove postfix mariadb-libs Step 2 For removing all existing mysql installation rpm -qa | grep -i mysql | xargs rpm -e Step 3 Command for installing new version (here only added needed installation files) ...