Domain Modelling Language

Model the structure of your domain entities with a lightweight Java-like domain-specific language and FF automatically generates all the support code.

Strong Consistency

Use a Software Transactional Memory to provide Strict Serializability for Enterprise Applications.

Transparent Persistence

Application state is automatically transferred to/from the underlying storage system.

 

TxIntrospector Module

The TxIntrospector module enables internal information gathering during a transaction. When enabled, the programmer may obtain a pt.ist.fenixframework.txintrospector.TxIntrospector instance, and use it to query what were the new/modified objects/relationships for a transaction.

Enabling the Module

To activate this module, the DML Compiler needs to be invoked with the property ptIstTxIntrospectorEnable set to true. This can be achieved either (1) via the command line by adding the switch -param ptIstTxIntrospectorEnable=true (no spaces around =) to the invocation of the compiler, or (2) via the maven plugin by adding that same parameter to the code generation phase as shown in the following example:

<build>
    <plugins>
        <plugin>
            <groupId>pt.ist</groupId>
            <artifactId>dml-maven-plugin</artifactId>
            <version>${project.version}</version>
            <configuration>
                <codeGeneratorClassName>${fenixframework.code.generator}</codeGeneratorClassName>
                <params>
                    <ptIstTxIntrospectorEnable>true</ptIstTxIntrospectorEnable>
                </params>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>generate-domain</goal>
                        <goal>post-compile</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

Accessing the TxIntrospector Instance

The FF client can obtain a TxIntrospector instance for a given transaction by calling TxIntrospector.getTxIntrospector(transaction), or for the active transaction for the current thread via TxIntrospector.getTxIntrospector().

While not enforced, it is recommended that the TxIntrospector be used only after the transaction commits, as information gathering is not thread-safe.

Note that calling TxIntrospector.getTxIntrospector() without activating the TxIntrospector module will result in a run-time exception.

Furthermore, although the TxIntrospector API may be used outside a transactional context, any access or operation on the domain objects contained therein should be performed inside an active transaction.

TxIntrospector API

Please refer to the FF javadocs for the TxIntrospector class.

Examples

Please refer to the test/test-txintrospector/ module for a sample test application that uses TxIntrospector.

 
 

© 2008-2013 Fénix Framework
Based on template design by Andreas Viklund