Skip to content

Commit

Permalink
make annotations and config packages independent on internal APIs
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <[email protected]>
  • Loading branch information
lukasj committed Mar 8, 2024
1 parent 592506c commit 1f9a377
Show file tree
Hide file tree
Showing 125 changed files with 6,670 additions and 328 deletions.
38 changes: 19 additions & 19 deletions docs/docs.dbws/src/main/asciidoc/creating_dbws_services002.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,23 @@ This example illustrates how to implement an EclipseLink
[source,oac_no_warn]
----
package some.java.package;
import org.eclipse.persistence.config.SessionCustomizer;
import org.eclipse.persistence.sessions.Session;
import org.eclipse.persistence.sessions.DatabaseLogin;
import org.eclipse.persistence.sessions.SessionCustomizer;
import org.eclipse.persistence.sessions.Session;
import org.eclipse.persistence.sessions.DatabaseLogin;
public class MySessionCustomizer implements SessionCustomizer {
public MySessionCustomizer() {
}
public void customize(Sesssion session) {
public void customize(Sesssion session) {
DatabaseLogin login = (DatabaseLogin)session.getDatasourceLogin();
// enable 'dirty' reads
login.setTransactionIsolation(DatabaseLogin.TRANSACTION_READ_UNCOMMITTED);
}
login.setTransactionIsolation(DatabaseLogin.TRANSACTION_READ_UNCOMMITTED);
}
}
----
In the `DBWSBuilder` configuration file, you must use the
Expand All @@ -65,13 +65,13 @@ specify if the customization applies to the ORM or ORX project
[source,oac_no_warn]
----
<?xml version="1.0" encoding="UTF-8"?>
<dbws-builder xmlns:xsd="http://www.w3.org/2001/XMLSchema"
<?xml version="1.0" encoding="UTF-8"?>
<dbws-builder xmlns:xsd="http://www.w3.org/2001/XMLSchema"
<properties>
<property name="projectName">customize_test</property>
...
<property name="orSessionCustomizerClassName">some.java.package.MyORSessionCustomizer</property>
----
[[sthref39]]
Expand All @@ -80,13 +80,13 @@ specify if the customization applies to the ORM or ORX project
[source,oac_no_warn]
----
<?xml version="1.0" encoding="UTF-8"?>
<dbws-builder xmlns:xsd="http://www.w3.org/2001/XMLSchema"
<?xml version="1.0" encoding="UTF-8"?>
<dbws-builder xmlns:xsd="http://www.w3.org/2001/XMLSchema"
<properties>
<property name="projectName">customize_test</property>
...
<property name="oxSessionCustomizerClassName">some.java.package.MyOXSessionCustomizer</property>
----
==== Advanced Customization
Expand Down Expand Up @@ -123,7 +123,7 @@ existing EclipseLink project maps with identical case-sensitive aliases
<class>some.package.SomeClass</class>
<alias>SomeAlias</alias>
...
<?xml version="1.0" encoding="UTF-8"?>
<object-persistence version="Eclipse Persistence Services - some version (some build date)" xmlns="http://www.eclipse.org/eclipselink/xsds/persistence" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:eclipselink="http://www.eclipse.org/eclipselink/xsds/persistence">
Expand All @@ -132,5 +132,5 @@ existing EclipseLink project maps with identical case-sensitive aliases
<class>some.package.SomeClass</class>
<alias>SomeAlias</alias>
...
----
46 changes: 23 additions & 23 deletions docs/docs.dbws/src/main/asciidoc/overview003.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ must match the order of `?` markers in the SQL string:
<property name="projectName">sql_binding_test</property>
... database properties ...
</properties>
<sql name="findEmpByName" isCollection="true" isSimpleXMLFormat="true">
<sql name="findEmpByName" isCollection="true" isSimpleXMLFormat="true">
<text>
<![CDATA[select * from EMP where EMPNO = ? and LAST_NAME = ?]]>
</text>
Expand Down Expand Up @@ -298,15 +298,15 @@ attribute, as shown in link:#CJAHDIFC[Example 1-9].
[source,oac_no_warn]
----
public interface NamingConventionTransformer {
public enum ElementStyle {
ELEMENT, ATTRIBUTE, NONE
};
public String generateSchemaName(String tableName);
public String generateElementAlias(String originalElementName);
public ElementStyle styleForElement(String originalElementName);
}
----
Expand All @@ -330,22 +330,22 @@ The following example shows how to implement a
[source,oac_no_warn]
----
package some.java.package;
import org.eclipse.persistence.config.SessionCustomizer;
import org.eclipse.persistence.sessions.SessionCustomizer;
import org.eclipse.persistence.sessions.Session;
import org.eclipse.persistence.sessions.DatabaseLogin;
public class MySessionCustomizer implements SessionCustomizer {
public MySessionCustomizer() {
}
public void customize(Sesssion session) {
DatabaseLogin login = (DatabaseLogin)session.getDatasourceLogin();
login.setTransactionIsolation(DatabaseLogin.TRANSACTION_READ_UNCOMMITTED);
}
}
----
In the `DBWSBuilder` builder XML file, specify if the customization
Expand Down Expand Up @@ -406,7 +406,7 @@ It is normally invoked from the command-line via its main method:
[source,oac_no_warn]
----
prompt > dbwsbuilder.cmd -builderFile {path_to_builder.xml} -stageDir {path_to_stageDir} -packageAs {packager}
----
The given builder XML file (link:#BABBAHFB[Example 1-10]) is parsed by
Expand Down Expand Up @@ -438,7 +438,7 @@ populated programmatically through property setters (i.e. `setDriver()`,
tableNamePattern="EMP"
/>
</dbws-builder>
----
The packager specified on the command-line is represented by a class
Expand All @@ -465,31 +465,31 @@ The primary responsibility of a `DBWSPackager` is to provide
// call-backs for stream management
public OutputStream getSchemaStream() throws FileNotFoundException;
public void closeSchemaStream(OutputStream schemaStream);
public OutputStream getSessionsStream(String sessionsFileName) throws FileNotFoundException;
public void closeSessionsStream(OutputStream sessionsStream);
public OutputStream getServiceStream() throws FileNotFoundException;
public void closeServiceStream(OutputStream serviceStream);
public OutputStream getOrStream() throws FileNotFoundException;
public void closeOrStream(OutputStream orStream);
public OutputStream getOxStream() throws FileNotFoundException;
public void closeOxStream(OutputStream oxStream);
public OutputStream getWSDLStream() throws FileNotFoundException;
public void closeWSDLStream(OutputStream wsdlStream);
public OutputStream getSWARefStream() throws FileNotFoundException;
public void closeSWARefStream(OutputStream swarefStream);
public OutputStream getWebXmlStream() throws FileNotFoundException;
public void closeWebXmlStream(OutputStream webXmlStream);
public OutputStream getProviderClassStream() throws FileNotFoundException;
public void closeProviderClassStream(OutputStream codeGenProviderStream);
public OutputStream getProviderSourceStream() throws FileNotFoundException;
public void closeProviderSourceStream(OutputStream sourceProviderStream);
----
Expand All @@ -503,7 +503,7 @@ packager:
[source,oac_no_warn]
----
public void start() ...
public void build(OutputStream dbwsSchemaStream, OutputStream dbwsSessionsStream,
OutputStream dbwsServiceStream, OutputStream dbwsOrStream, OutputStream dbwsOxStream,
OutputStream swarefStream, OutputStream webXmlStream, OutputStream wsdlStream,
Expand Down
Loading

0 comments on commit 1f9a377

Please sign in to comment.