JBoss.orgCommunity Documentation
Designer provides modeling support for server-side materialization including:
Extension properties for materialized view and referenced materialized tables
General Create POJO feature for selected table or view
Materialize action and wizard to set required properties and generate optional JDG module corresponding to the generated materialized table
JDG connection profile definition and wizard
The Teiid runtime supports materialization which is identified at VDB deployment time through metadata properties. A couple base properties are provided by Designer's relational table properties. These include a Materialized boolean property and a Materialized Table reference property as shown below. In addition, there are extension properties for a materialized table to help set-up your materialized table behavior. (See Teiid Runtime documentation for details)
As part of the new 11.0 Designer feature for supporting JDG and materialization, we added a separate Create POJO action and wizard. This feature will generate a simple java class that results in getter and setter methods for each column. There is also an option to generate an JDG module containing the compiled class.
You can now materialize a view and generate the necessary related artifacts to support external materialization through your JDG cache. The generated artifacts include:
New source model containing both the materialized table and companion staging table.
POJO java file and compiled java class
JDG zip module containing packaged jar file and module.xml file for deployment/extraction into your JBoss server
Follow the steps below to materialize your view....
Step 1- In the Model Explorerselect the view you wish to materialize and right-click select the Modeling > Materialize action
Step 2- On the first wizard page, define your generated source model name and location within the same model project. Click NEXT> to continue.
Step 3- On the second wizard page, select your options for generating a POJO and a JDG module as well as the output folder location in your model project. Click Finish perform to complete the operations.
The figure below shows the file structure of the generated POJO, class file, jar and jdg module zip file
JDG connection profile wizard can be used to define JDG-specific connection information required to create a server-side resource adapter. By setting the JDG connection profile on your generated materialized source model you can use the Create Data Source feature to create and deploy a resource adapter that supports your materialized view.
To create a JDG connection profile, open the Database Development perspective and select the New Connection Profile action and JDG profile option as shown below.
Enter your unique JBoss JNDI name and various JDG-specific resource adapter properties and click Finish