init span osb mdb
This commit is contained in:
commit
39af154b5d
278
LogProcessorMdb.jpr
Normal file
278
LogProcessorMdb.jpr
Normal file
@ -0,0 +1,278 @@
|
|||||||
|
<?xml version = '1.0' encoding = 'UTF-8'?>
|
||||||
|
<jpr:project xmlns:jpr="http://xmlns.oracle.com/ide/project">
|
||||||
|
<hash n="component-versions">
|
||||||
|
<value n="oracle.adfdt.controller.adfc.source.migration.AdfControllerSchemaMigrator" v="11.1.1.1.0"/>
|
||||||
|
<value n="oracle.adfdt.controller.common.migrator.ProjectMigrator" v="11.1.1.1.0"/>
|
||||||
|
<value n="oracle.adfdt.controller.jsf2.diagram.migrate.JsfNodeMigratorHelper" v="11.1.1.1.0"/>
|
||||||
|
<value n="oracle.adfdt.controller.migrate.TrinidadDatabindingsProjectMigrator" v="11.1.2.0.0"/>
|
||||||
|
<value n="oracle.adfdtinternal.dvt.datapresdt.migration.DVTDataMapMigrator" v="11.1.1.1.0.3"/>
|
||||||
|
<value n="oracle.adfdtinternal.dvt.datapresdt.migration.DVTWebAppConfigurationMigrator" v="12.1.3.0.0"/>
|
||||||
|
<value n="oracle.adfdtinternal.model.ide.migration.ProjectMigrator" v="11.1.1.1.0.11.1.1"/>
|
||||||
|
<value n="oracle.adfdtinternal.model.ide.placeholderdc.migrator.PlaceholderProjectMigrator" v="12.1.4.0.0"/>
|
||||||
|
<value n="oracle.adfdtinternal.model.ide.security.wizard.FormPageMigrator" v="11.1.1.0.0"/>
|
||||||
|
<value n="oracle.adfdtinternal.model.ide.security.wizard.JpsFilterMigrator" v="11.1.1.1.0"/>
|
||||||
|
<value n="oracle.adfdtinternal.model.ide.xmled.migration.ADFNodeMigrator" v="11.1.1.1.0.5"/>
|
||||||
|
<value n="oracle.adfdtinternal.model.ide.xmled.migration.PageDefinitionParameterValueMigrator" v="11.1.1.1.0.5"/>
|
||||||
|
<value n="oracle.adfdtinternal.model.ide.xmled.migration.RestDataControlMigrator" v="12.1.4.0.0"/>
|
||||||
|
<value n="oracle.adfdtinternal.model.ide.xmled.migration.WebXmlMigrator" v="11.1.1.1.0"/>
|
||||||
|
<value n="oracle.adfdtinternal.view.common.migration.wizards.MigrationHelper" v="11.1.1.1.0.3"/>
|
||||||
|
<value n="oracle.adfdtinternal.view.rich.binding.migration.JarResourceMigrator" v="11.1.1.1.0"/>
|
||||||
|
<value n="oracle.adfdtinternal.view.rich.migration.ComponentIdNodeMigratorHelper" v="11.1.1.1.0.01"/>
|
||||||
|
<value n="oracle.adfdtinternal.view.rich.migration.FacesLibraryVersionMigrator" v="11.1.1.1.0.1"/>
|
||||||
|
<value n="oracle.ide.model.Project" v="12.2.1.4.0"/>
|
||||||
|
<value n="oracle.ide.model.ResourcePathsMigrator" v="11.1.1.1.0"/>
|
||||||
|
<value n="oracle.ideimpl.model.TechnologyScopeUpdateMigrator" v="11.1.2.0.0.6"/>
|
||||||
|
<value n="oracle.jbo.dt.jclient.migrator.JCProjectMigrator" v="11.1.1.1.0"/>
|
||||||
|
<value n="oracle.jbo.dt.jdevx.deployment.JbdProjectMigrator" v="11.1.2.0.0"/>
|
||||||
|
<value n="oracle.jbo.dt.jdevx.ui.appnav.APAdfConfigMigrator" v="11.1.2.0.0"/>
|
||||||
|
<value n="oracle.jbo.dt.jdevx.ui.appnav.APProjectMigrator" v="11.1.1.0.1.5"/>
|
||||||
|
<value n="oracle.jbo.dt.migrate.ResourceBundlePathMigrator" v="11.1.1.0.1.5"/>
|
||||||
|
<value n="oracle.jbo.dt.migration.ServiceInterfaceMigrator" v="11.1.1.1.0"/>
|
||||||
|
<value n="oracle.jdeveloper.dbmodeler.Migration" v="12.1.1.0.0"/>
|
||||||
|
<value n="oracle.jdeveloper.ejb.EjbMigrator" v="11.1.1.1.0"/>
|
||||||
|
<value n="oracle.jdeveloper.library.ProjectLibraryMigrator" v="11.1.1.1.0"/>
|
||||||
|
<value n="oracle.jdeveloper.maven.migrator.POMNodeMigrator" v="12.2.1.0.0"/>
|
||||||
|
<value n="oracle.jdeveloper.model.OutputDirectoryMigrator" v="11.1.1.1.0"/>
|
||||||
|
<value n="oracle.jdevimpl.deploy.jps.JpsDataMigrator" v="11.1.1.1.0"/>
|
||||||
|
<value n="oracle.jdevimpl.deploy.migrators.DeploymentMigrator" v="12.1.2.0.1"/>
|
||||||
|
<value n="oracle.jdevimpl.jsp.JspMigrator" v="11.1.1"/>
|
||||||
|
<value n="oracle.jdevimpl.offlinedb.migration.OfflineDBProjectMigrator" v="12.1.1.0.0"/>
|
||||||
|
<value n="oracle.jdevimpl.offlinedb.migration.SXMLOfflineDBProjectMigrator" v="12.1.4.0.0"/>
|
||||||
|
<value n="oracle.jdevimpl.resourcebundle.XliffAddin$XliffMigratorHelper" v="11.1.1.1.0"/>
|
||||||
|
<value n="oracle.jdevimpl.webapp.facelets.libraries.FaceletsLibraryMigrator" v="12.2.1.0.0"/>
|
||||||
|
<value n="oracle.jdevimpl.webapp.jsp.libraries.JspLibraryMigrator" v="12.1.4.0.0"/>
|
||||||
|
<value n="oracle.jdevimpl.webapp.jsp.taglibraries.trinidad.migration.TrinidadLibraryVersionMigrator" v="11.1.1.1.0.1"/>
|
||||||
|
<value n="oracle.jdevimpl.webapp.WebAppContentSetNodeMigratorHelper" v="11.1.1"/>
|
||||||
|
<value n="oracle.jdevimpl.webapp.WebAppProjectNodeMigratorHelper" v="12.2.1.0.0"/>
|
||||||
|
<value n="oracle.jdevimpl.webservices.rest.migration.RestAppClassMigrator" v="12.1.3.0.0"/>
|
||||||
|
<value n="oracle.jdevimpl.webservices.rest.migration.RestJerseyLibMigrator" v="12.1.3.0.0"/>
|
||||||
|
<value n="oracle.jdevimpl.webservices.rest.migration.RestLibraryMigrator" v="12.1.1.0.0"/>
|
||||||
|
<value n="oracle.jdevimpl.webservices.rest.migration.RestOwsmPolicyMigrator" v="12.1.3.0.0"/>
|
||||||
|
<value n="oracle.jdevimpl.webservices.rest.migration.RestPathMigrator" v="11.1.2.0.0"/>
|
||||||
|
<value n="oracle.jdevimpl.webservices.rest.migration.RestWebAppMigrator" v="12.1.3.0.0"/>
|
||||||
|
<value n="oracle.jdevimpl.webservices.rest.migration.RestWeblogicWebAppMigrator" v="12.1.3.0.0"/>
|
||||||
|
<value n="oracle.jdevimpl.webservices.WebServicesMigratorHelper" v="11.1.1.1.0"/>
|
||||||
|
<value n="oracle.jdevimpl.xml.wl.WeblogicMigratorHelper" v="11.1.1.1.0"/>
|
||||||
|
<value n="oracle.modeler.bmmigrate.management.Migration" v="11.1.1.1.0"/>
|
||||||
|
<value n="oracle.sb.tooling.ide.libs.SbProjectMigrator" v="12.1.4.0.0"/>
|
||||||
|
<value n="oracle.tip.tools.ide.fabric.addin.SCAProjectMigrator" v="11.1.1.1.0.13"/>
|
||||||
|
<value n="oracle.tip.tools.ide.workflow.addin.TaskFormMigratorAddin" v="12.1.3.0.0"/>
|
||||||
|
<value n="oracle.toplink.workbench.addin.migration.PersistenceProjectMigrator" v="11.1.1.1.0"/>
|
||||||
|
<value n="oracle.toplink.workbench.addin.migration.TopLinkProjectMigrator" v="11.1.1.1.0"/>
|
||||||
|
</hash>
|
||||||
|
<list n="contentSets">
|
||||||
|
<string v="oracle.mds.internal.dt.ide.MDSLibraryCustCSProvider/mdsContentSet"/>
|
||||||
|
<string v="oracle.mds.internal.dt.ide.MDSADFLibVirtualNodeCSProvider/mdsLibVirtualNodeContentSet"/>
|
||||||
|
<string v="oracle.jdeveloper.model.J2eeSettings/webContentSet"/>
|
||||||
|
<string v="oracle.jdeveloper.model.PathsConfiguration/javaContentSet"/>
|
||||||
|
<string v="oracle.ide.model.ResourcePaths/resourcesContentSet"/>
|
||||||
|
<string v="oracle.jdeveloper.offlinedb.model.OfflineDBProjectSettings/offlineDBContentSet"/>
|
||||||
|
<string v="oracle.adfdtinternal.model.ide.settings.ADFMSettings/adfmContentSet"/>
|
||||||
|
<string v="oracle.bm.commonIde.data.project.ModelerProjectSettings/modelersContentSet"/>
|
||||||
|
<string v="oracle.tip.tools.ide.fabric.addin.SCAContentSetProvider/sca-content"/>
|
||||||
|
<string v="oracle.toplink.workbench.addin/toplinkContentSet"/>
|
||||||
|
<string v="oracle.sb.tooling.ide.core.projects.SbProjectSettings/sbContentSet"/>
|
||||||
|
<string v="oracle.tip.tools.ide.ess.addin.ESSContentSetProvider/ess-content"/>
|
||||||
|
</list>
|
||||||
|
<value n="defaultPackage" v="org.soakemenkeu"/>
|
||||||
|
<hash n="ejbModuleContainer">
|
||||||
|
<hash n="ejb21IdToEjbNameMap">
|
||||||
|
<value n="ejb:f097f047-0192-1000-8001-c0a801060a3b" v="JMSConsumerBean"/>
|
||||||
|
<value n="ejb:f2a9e482-0192-1000-8001-c0a8010958d0" v="MessageDrivenEJBBean"/>
|
||||||
|
</hash>
|
||||||
|
<url n="ejbJarNodeURL" path="src/META-INF/ejb-jar.xml"/>
|
||||||
|
<value n="ejbMetaDataPrefs" v="PREFASXMLANNON"/>
|
||||||
|
<value n="ejbVersion" v="3.0"/>
|
||||||
|
<value n="ejbVersionMinor" v="0.1"/>
|
||||||
|
<url n="weblogicEjbJarNodeURL" path="src/META-INF/weblogic-ejb-jar.xml"/>
|
||||||
|
</hash>
|
||||||
|
<hash n="oracle.ide.model.TechnologyScopeConfiguration">
|
||||||
|
<list n="technologyScope">
|
||||||
|
<string v="Database"/>
|
||||||
|
<string v="EJB"/>
|
||||||
|
<string v="Java"/>
|
||||||
|
<string v="TopLink"/>
|
||||||
|
<string v="XML"/>
|
||||||
|
</list>
|
||||||
|
</hash>
|
||||||
|
<hash n="oracle.jdeveloper.compiler.OjcConfiguration">
|
||||||
|
<value n="webIANAEncoding" v="windows-1252"/>
|
||||||
|
</hash>
|
||||||
|
<hash n="oracle.jdeveloper.deploy.dt.DeploymentProfiles">
|
||||||
|
<hash n="profileDefinitions">
|
||||||
|
<hash n="OsbLogProcessor_LogProcessorMdb_ejb">
|
||||||
|
<hash n="archiveOptions">
|
||||||
|
<value n="hasManifest" v="true"/>
|
||||||
|
</hash>
|
||||||
|
<url n="earURL" path="deploy/OsbLogProcessor_LogProcessorMdb_ejb.ear"/>
|
||||||
|
<value n="enterpriseAppName" v="OsbLogProcessor_LogProcessorMdb_ejb"/>
|
||||||
|
<hash n="fileGroups">
|
||||||
|
<list n="groups">
|
||||||
|
<hash>
|
||||||
|
<list n="contributors">
|
||||||
|
<hash>
|
||||||
|
<value n="type" v="2"/>
|
||||||
|
</hash>
|
||||||
|
<hash>
|
||||||
|
<value n="type" v="7"/>
|
||||||
|
</hash>
|
||||||
|
</list>
|
||||||
|
<value n="displayName" v="Project Output"/>
|
||||||
|
<hash n="filters">
|
||||||
|
<list n="rules">
|
||||||
|
<hash>
|
||||||
|
<value n="pattern" v="**"/>
|
||||||
|
<value n="type" v="0"/>
|
||||||
|
</hash>
|
||||||
|
</list>
|
||||||
|
</hash>
|
||||||
|
<value n="internalName" v="project-output"/>
|
||||||
|
<value n="type" v="1"/>
|
||||||
|
</hash>
|
||||||
|
</list>
|
||||||
|
</hash>
|
||||||
|
<url n="jarURL" path="deploy/OsbLogProcessor_LogProcessorMdb_ejb.jar"/>
|
||||||
|
<value n="profileClass" v="oracle.jdeveloper.deploy.ejb.EjbProfile"/>
|
||||||
|
<value n="profileName" v="OsbLogProcessor_LogProcessorMdb_ejb"/>
|
||||||
|
</hash>
|
||||||
|
<hash n="webapp1">
|
||||||
|
<hash n="appletArchives"/>
|
||||||
|
<hash n="appletFiles">
|
||||||
|
<value n="autoInclude" v="true"/>
|
||||||
|
<list n="selectionFilters">
|
||||||
|
<string v="oracle.jdevimpl.deploy.common.JavaSelectionFilter"/>
|
||||||
|
</list>
|
||||||
|
</hash>
|
||||||
|
<hash n="archiveOptions">
|
||||||
|
<value n="hasManifest" v="false"/>
|
||||||
|
</hash>
|
||||||
|
<value n="enterpriseAppName" v="webapp1"/>
|
||||||
|
<hash n="fileGroups">
|
||||||
|
<list n="groups">
|
||||||
|
<hash>
|
||||||
|
<list n="contributors">
|
||||||
|
<hash>
|
||||||
|
<value n="type" v="5"/>
|
||||||
|
</hash>
|
||||||
|
</list>
|
||||||
|
<value n="displayName" v="Web Files"/>
|
||||||
|
<hash n="filters">
|
||||||
|
<list n="rules">
|
||||||
|
<hash>
|
||||||
|
<value n="pattern" v="**"/>
|
||||||
|
<value n="type" v="0"/>
|
||||||
|
</hash>
|
||||||
|
</list>
|
||||||
|
</hash>
|
||||||
|
<value n="internalName" v="web-files"/>
|
||||||
|
<value n="type" v="1"/>
|
||||||
|
</hash>
|
||||||
|
<hash>
|
||||||
|
<list n="contributors">
|
||||||
|
<hash>
|
||||||
|
<value n="type" v="2"/>
|
||||||
|
</hash>
|
||||||
|
<hash>
|
||||||
|
<value n="type" v="7"/>
|
||||||
|
</hash>
|
||||||
|
</list>
|
||||||
|
<value n="displayName" v="WEB-INF/classes"/>
|
||||||
|
<hash n="filters">
|
||||||
|
<list n="rules">
|
||||||
|
<hash>
|
||||||
|
<value n="pattern" v="**"/>
|
||||||
|
<value n="type" v="0"/>
|
||||||
|
</hash>
|
||||||
|
</list>
|
||||||
|
</hash>
|
||||||
|
<value n="internalName" v="project-output"/>
|
||||||
|
<value n="targetWithinJar" v="WEB-INF/classes"/>
|
||||||
|
<value n="type" v="1"/>
|
||||||
|
</hash>
|
||||||
|
<hash>
|
||||||
|
<value n="displayName" v="WEB-INF/lib"/>
|
||||||
|
<hash n="filters">
|
||||||
|
<list n="rules">
|
||||||
|
<hash>
|
||||||
|
<value n="pattern" v="**"/>
|
||||||
|
<value n="type" v="0"/>
|
||||||
|
</hash>
|
||||||
|
</list>
|
||||||
|
</hash>
|
||||||
|
<value n="internalName" v="libraries"/>
|
||||||
|
<value n="targetWithinJar" v="WEB-INF/lib"/>
|
||||||
|
<value n="type" v="3"/>
|
||||||
|
</hash>
|
||||||
|
</list>
|
||||||
|
</hash>
|
||||||
|
<url n="jarURL" path="deploy/webapp1.war"/>
|
||||||
|
<value n="profileClass" v="oracle.jdeveloper.deploy.war.WarProfile"/>
|
||||||
|
<value n="profileName" v="webapp1"/>
|
||||||
|
</hash>
|
||||||
|
</hash>
|
||||||
|
<list n="profileList">
|
||||||
|
<string v="OsbLogProcessor_LogProcessorMdb_ejb"/>
|
||||||
|
<string v="webapp1"/>
|
||||||
|
</list>
|
||||||
|
</hash>
|
||||||
|
<hash n="oracle.jdeveloper.model.J2eeSettings">
|
||||||
|
<value n="j2eeWebAppName" v="OsbLogProcessor-LogProcessorMdb-webapp"/>
|
||||||
|
<value n="j2eeWebContextRoot" v="OsbLogProcessor-LogProcessorMdb-context-root"/>
|
||||||
|
</hash>
|
||||||
|
<hash n="oracle.jdeveloper.model.PathsConfiguration">
|
||||||
|
<hash n="javaContentSet">
|
||||||
|
<list n="pattern-filters">
|
||||||
|
<string v="+**"/>
|
||||||
|
</list>
|
||||||
|
<list n="url-path">
|
||||||
|
<url path="src/"/>
|
||||||
|
</list>
|
||||||
|
</hash>
|
||||||
|
</hash>
|
||||||
|
<hash n="oracle.jdevimpl.config.JProjectLibraries">
|
||||||
|
<list n="exportedReferences">
|
||||||
|
<hash>
|
||||||
|
<value n="id" v="Java EE"/>
|
||||||
|
<value n="isJDK" v="false"/>
|
||||||
|
</hash>
|
||||||
|
<hash>
|
||||||
|
<value n="id" v="EJB"/>
|
||||||
|
<value n="isJDK" v="false"/>
|
||||||
|
</hash>
|
||||||
|
<hash>
|
||||||
|
<value n="id" v="TopLink"/>
|
||||||
|
<value n="isJDK" v="false"/>
|
||||||
|
</hash>
|
||||||
|
<hash>
|
||||||
|
<value n="id" v="AQJMS"/>
|
||||||
|
<value n="isJDK" v="false"/>
|
||||||
|
</hash>
|
||||||
|
</list>
|
||||||
|
<list n="libraryReferences">
|
||||||
|
<hash>
|
||||||
|
<value n="id" v="Java EE"/>
|
||||||
|
<value n="isJDK" v="false"/>
|
||||||
|
</hash>
|
||||||
|
<hash>
|
||||||
|
<value n="id" v="EJB"/>
|
||||||
|
<value n="isJDK" v="false"/>
|
||||||
|
</hash>
|
||||||
|
<hash>
|
||||||
|
<value n="id" v="TopLink"/>
|
||||||
|
<value n="isJDK" v="false"/>
|
||||||
|
</hash>
|
||||||
|
<hash>
|
||||||
|
<value n="id" v="AQJMS"/>
|
||||||
|
<value n="isJDK" v="false"/>
|
||||||
|
</hash>
|
||||||
|
</list>
|
||||||
|
</hash>
|
||||||
|
<hash n="oracle.jdevimpl.config.JProjectPaths">
|
||||||
|
<url n="outputDirectory" path="classes/"/>
|
||||||
|
</hash>
|
||||||
|
<hash n="oracle.toplink.workbench.addin">
|
||||||
|
<hash n="persistence-list">
|
||||||
|
<value n="jpa-version" v="2.0"/>
|
||||||
|
</hash>
|
||||||
|
</hash>
|
||||||
|
</jpr:project>
|
||||||
BIN
classes/.data/LogProcessorMdb.cdi
Normal file
BIN
classes/.data/LogProcessorMdb.cdi
Normal file
Binary file not shown.
24
classes/META-INF/ejb-jar.xml
Normal file
24
classes/META-INF/ejb-jar.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
|
||||||
|
<!-- Generated XML! -->
|
||||||
|
<ejb-jar>
|
||||||
|
<enterprise-beans>
|
||||||
|
<message-driven>
|
||||||
|
<ejb-name>MessageDrivenEJBBean</ejb-name>
|
||||||
|
<ejb-class>org.soakemenkeu.MessageDrivenEJBBean</ejb-class>
|
||||||
|
<transaction-type>Container</transaction-type>
|
||||||
|
<acknowledge-mode>Auto-acknowledge</acknowledge-mode>
|
||||||
|
<message-driven-destination>
|
||||||
|
<destination-type>javax.jms.Queue</destination-type>
|
||||||
|
</message-driven-destination>
|
||||||
|
</message-driven>
|
||||||
|
</enterprise-beans>
|
||||||
|
<assembly-descriptor>
|
||||||
|
<container-transaction>
|
||||||
|
<method>
|
||||||
|
<ejb-name>MessageDrivenEJBBean</ejb-name>
|
||||||
|
<method-name>onMessage</method-name>
|
||||||
|
</method>
|
||||||
|
<trans-attribute>NotSupported</trans-attribute>
|
||||||
|
</container-transaction>
|
||||||
|
</assembly-descriptor >
|
||||||
|
</ejb-jar>
|
||||||
18
classes/META-INF/weblogic-ejb-jar.xml
Normal file
18
classes/META-INF/weblogic-ejb-jar.xml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN' 'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
|
||||||
|
<!-- Generated XML! -->
|
||||||
|
<weblogic-ejb-jar>
|
||||||
|
<weblogic-enterprise-bean>
|
||||||
|
<ejb-name>MessageDrivenEJBBean</ejb-name>
|
||||||
|
<message-driven-descriptor>
|
||||||
|
<pool>
|
||||||
|
<max-beans-in-free-pool>20</max-beans-in-free-pool>
|
||||||
|
<initial-beans-in-free-pool>5</initial-beans-in-free-pool>
|
||||||
|
</pool>
|
||||||
|
<destination-jndi-name>jms/loggingQueue</destination-jndi-name>
|
||||||
|
<connection-factory-jndi-name>jms/logConnFactory</connection-factory-jndi-name>
|
||||||
|
<jms-polling-interval-seconds>5</jms-polling-interval-seconds>
|
||||||
|
</message-driven-descriptor>
|
||||||
|
<transaction-descriptor></transaction-descriptor>
|
||||||
|
<jndi-name>mdb/MessageDrivenEJBBean</jndi-name>
|
||||||
|
</weblogic-enterprise-bean>
|
||||||
|
</weblogic-ejb-jar>
|
||||||
1
classes/config.properties
Normal file
1
classes/config.properties
Normal file
@ -0,0 +1 @@
|
|||||||
|
api.url=http://10.216.99.101:8002/jmsLogging/ProxyService/httpLoggingPS
|
||||||
BIN
classes/org/soakemenkeu/ConfigUtil.class
Normal file
BIN
classes/org/soakemenkeu/ConfigUtil.class
Normal file
Binary file not shown.
BIN
classes/org/soakemenkeu/MessageDrivenEJBBean.class
Normal file
BIN
classes/org/soakemenkeu/MessageDrivenEJBBean.class
Normal file
Binary file not shown.
BIN
deploy/OsbLogProcessor_LogProcessorMdb_ejb.jar
Normal file
BIN
deploy/OsbLogProcessor_LogProcessorMdb_ejb.jar
Normal file
Binary file not shown.
24
src/META-INF/ejb-jar.xml
Normal file
24
src/META-INF/ejb-jar.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
|
||||||
|
<!-- Generated XML! -->
|
||||||
|
<ejb-jar>
|
||||||
|
<enterprise-beans>
|
||||||
|
<message-driven>
|
||||||
|
<ejb-name>MessageDrivenEJBBean</ejb-name>
|
||||||
|
<ejb-class>org.soakemenkeu.MessageDrivenEJBBean</ejb-class>
|
||||||
|
<transaction-type>Container</transaction-type>
|
||||||
|
<acknowledge-mode>Auto-acknowledge</acknowledge-mode>
|
||||||
|
<message-driven-destination>
|
||||||
|
<destination-type>javax.jms.Queue</destination-type>
|
||||||
|
</message-driven-destination>
|
||||||
|
</message-driven>
|
||||||
|
</enterprise-beans>
|
||||||
|
<assembly-descriptor>
|
||||||
|
<container-transaction>
|
||||||
|
<method>
|
||||||
|
<ejb-name>MessageDrivenEJBBean</ejb-name>
|
||||||
|
<method-name>onMessage</method-name>
|
||||||
|
</method>
|
||||||
|
<trans-attribute>NotSupported</trans-attribute>
|
||||||
|
</container-transaction>
|
||||||
|
</assembly-descriptor >
|
||||||
|
</ejb-jar>
|
||||||
18
src/META-INF/weblogic-ejb-jar.xml
Normal file
18
src/META-INF/weblogic-ejb-jar.xml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN' 'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
|
||||||
|
<!-- Generated XML! -->
|
||||||
|
<weblogic-ejb-jar>
|
||||||
|
<weblogic-enterprise-bean>
|
||||||
|
<ejb-name>MessageDrivenEJBBean</ejb-name>
|
||||||
|
<message-driven-descriptor>
|
||||||
|
<pool>
|
||||||
|
<max-beans-in-free-pool>20</max-beans-in-free-pool>
|
||||||
|
<initial-beans-in-free-pool>5</initial-beans-in-free-pool>
|
||||||
|
</pool>
|
||||||
|
<destination-jndi-name>jms/loggingQueue</destination-jndi-name>
|
||||||
|
<connection-factory-jndi-name>jms/logConnFactory</connection-factory-jndi-name>
|
||||||
|
<jms-polling-interval-seconds>5</jms-polling-interval-seconds>
|
||||||
|
</message-driven-descriptor>
|
||||||
|
<transaction-descriptor></transaction-descriptor>
|
||||||
|
<jndi-name>mdb/MessageDrivenEJBBean</jndi-name>
|
||||||
|
</weblogic-enterprise-bean>
|
||||||
|
</weblogic-ejb-jar>
|
||||||
1
src/config.properties
Normal file
1
src/config.properties
Normal file
@ -0,0 +1 @@
|
|||||||
|
api.url=http://10.216.99.101:8002/jmsLogging/ProxyService/httpLoggingPS
|
||||||
25
src/org/soakemenkeu/ConfigUtil.java
Normal file
25
src/org/soakemenkeu/ConfigUtil.java
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
package org.soakemenkeu;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
public class ConfigUtil {
|
||||||
|
private static Properties properties = new Properties();
|
||||||
|
|
||||||
|
static {
|
||||||
|
try (InputStream input = ConfigUtil.class.getClassLoader().getResourceAsStream("config.properties")) {
|
||||||
|
if (input == null) {
|
||||||
|
System.out.println("Sorry, unable to find config.properties");
|
||||||
|
// return;
|
||||||
|
}
|
||||||
|
// Load the properties file
|
||||||
|
properties.load(input);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getProperty(String key) {
|
||||||
|
return properties.getProperty(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
230
src/org/soakemenkeu/MessageDrivenEJBBean.java
Normal file
230
src/org/soakemenkeu/MessageDrivenEJBBean.java
Normal file
@ -0,0 +1,230 @@
|
|||||||
|
package org.soakemenkeu;
|
||||||
|
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
|
||||||
|
|
||||||
|
import javax.jms.TextMessage;
|
||||||
|
import javax.jms.Message;
|
||||||
|
import javax.jms.MessageListener;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
|
||||||
|
import java.io.OutputStreamWriter;
|
||||||
|
|
||||||
|
import java.net.HttpURLConnection;
|
||||||
|
import java.net.URL;
|
||||||
|
|
||||||
|
|
||||||
|
import javax.jms.JMSException;
|
||||||
|
|
||||||
|
import javax.ejb.EJBException;
|
||||||
|
import javax.ejb.CreateException;
|
||||||
|
import javax.ejb.MessageDrivenBean;
|
||||||
|
import javax.ejb.MessageDrivenContext;
|
||||||
|
import java.io.StringReader;
|
||||||
|
import java.io.StringWriter;
|
||||||
|
|
||||||
|
import javax.xml.parsers.DocumentBuilder;
|
||||||
|
import javax.xml.parsers.DocumentBuilderFactory;
|
||||||
|
import org.w3c.dom.Document;
|
||||||
|
import org.w3c.dom.Element;
|
||||||
|
import org.xml.sax.InputSource;
|
||||||
|
import org.xml.sax.SAXException;
|
||||||
|
|
||||||
|
import javax.xml.XMLConstants;
|
||||||
|
import javax.xml.parsers.ParserConfigurationException;
|
||||||
|
import javax.xml.transform.Transformer;
|
||||||
|
import javax.xml.transform.TransformerException;
|
||||||
|
import javax.xml.transform.TransformerFactory;
|
||||||
|
import javax.xml.transform.dom.DOMSource;
|
||||||
|
import javax.xml.transform.stream.StreamResult;
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.DriverManager;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
|
||||||
|
|
||||||
|
import org.w3c.dom.Node;
|
||||||
|
import org.w3c.dom.NodeList;
|
||||||
|
|
||||||
|
public class MessageDrivenEJBBean implements MessageDrivenBean, MessageListener {
|
||||||
|
private MessageDrivenContext mdbContext;
|
||||||
|
private void log(String s) {
|
||||||
|
// if (true) System.out.println(s);
|
||||||
|
} // container callback methods
|
||||||
|
|
||||||
|
public void ejbRemove() throws EJBException { log("ejbRemove called"); }
|
||||||
|
|
||||||
|
public void setMessageDrivenContext(MessageDrivenContext ctx) { mdbContext = ctx; log("context set"); }
|
||||||
|
|
||||||
|
public void ejbCreate () throws CreateException { log("ejbCreate called"); } // The implementation of the onMessage method
|
||||||
|
|
||||||
|
public void onMessage(Message msg) {
|
||||||
|
TextMessage tm = (TextMessage) msg;
|
||||||
|
try {
|
||||||
|
log("onMessage called");
|
||||||
|
String msgPayload = tm.getText();
|
||||||
|
msgPayload.replace("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>","");
|
||||||
|
// sendHttpPost(text);
|
||||||
|
// Document jmsMessage = convertStringToXml(text);
|
||||||
|
// Node root = jmsMessage.getDocumentElement();
|
||||||
|
// int logID = getLogNextSeq();
|
||||||
|
// if (root != null){
|
||||||
|
// NodeList nodeList = ((Element) root).getElementsByTagName("soa:LogRequest");
|
||||||
|
// for (int i = 0; i < nodeList.getLength(); i++) {
|
||||||
|
// Node nodeXml = nodeList.item(i);
|
||||||
|
// if (nodeXml.getNodeType() == Node.ELEMENT_NODE) {
|
||||||
|
// Element element = (Element) nodeXml;
|
||||||
|
// System.out.println("[myMessageDrivenBean] element: " + element.toString() );
|
||||||
|
// } else {
|
||||||
|
// System.out.println("[myMessageDrivenBean] node: " + nodeXml.toString() );
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
String postPayload ="<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:soa=\"http://soa-kemenkeu.org\"><soapenv:Header/><soapenv:Body>";
|
||||||
|
String cleanPayload = msgPayload.replace("<?xml version=\"1.0\" encoding=\"UTF-8\"", "");
|
||||||
|
String cleanPayload2 = cleanPayload.replace("?>", "");
|
||||||
|
postPayload += cleanPayload2.replace("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>","");
|
||||||
|
postPayload += " </soapenv:Body></soapenv:Envelope>";
|
||||||
|
|
||||||
|
|
||||||
|
System.out.println("[myMessageDrivenBean] Received message: " + msgPayload );
|
||||||
|
System.out.println("[myMessageDrivenBean] postPayload message: " + postPayload );
|
||||||
|
sendHttpPost(postPayload);
|
||||||
|
|
||||||
|
|
||||||
|
} catch(JMSException ex) {
|
||||||
|
System.out.println("Caught JMSException: " + ex );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// private static String convertXmlToString(Document doc) {
|
||||||
|
// DOMSource domSource = new DOMSource(doc);
|
||||||
|
// StringWriter writer = new StringWriter();
|
||||||
|
// StreamResult result = new StreamResult(writer);
|
||||||
|
// TransformerFactory tf = TransformerFactory.newInstance();
|
||||||
|
// Transformer transformer = null;
|
||||||
|
// try {
|
||||||
|
// transformer = tf.newTransformer();
|
||||||
|
// transformer.transform(domSource, result);
|
||||||
|
// } catch (TransformerException e) {
|
||||||
|
// throw new RuntimeException(e);
|
||||||
|
// }
|
||||||
|
// return writer.toString();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// private static Document convertStringToXml(String xmlString) {
|
||||||
|
//
|
||||||
|
// DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
|
||||||
|
//
|
||||||
|
// try {
|
||||||
|
//
|
||||||
|
// // optional, but recommended
|
||||||
|
// // process XML securely, avoid attacks like XML External Entities (XXE)
|
||||||
|
// dbf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
|
||||||
|
//
|
||||||
|
// DocumentBuilder builder = dbf.newDocumentBuilder();
|
||||||
|
//
|
||||||
|
// Document doc = builder.parse(new InputSource(new StringReader(xmlString)));
|
||||||
|
//
|
||||||
|
// return doc;
|
||||||
|
//
|
||||||
|
// } catch (ParserConfigurationException | IOException | SAXException e) {
|
||||||
|
// throw new RuntimeException(e);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
|
// private int getLogNextSeq(){
|
||||||
|
// int logId = 0;
|
||||||
|
// String dbUrl = ConfigUtil.getProperty("db.url");
|
||||||
|
// String dbUsername = ConfigUtil.getProperty("db.username");
|
||||||
|
// String dbPassword = ConfigUtil.getProperty("db.password");
|
||||||
|
// ResultSet rs = null;
|
||||||
|
// try (Connection connection = DriverManager.getConnection(dbUrl, dbUsername, dbPassword)) {
|
||||||
|
// String sql = "SELECT PKLOGIDSEQ.nextval FROM dual";
|
||||||
|
// PreparedStatement preparedStatement = connection.prepareStatement(sql);
|
||||||
|
// rs = preparedStatement.executeQuery();
|
||||||
|
//
|
||||||
|
// if (rs.next()) {
|
||||||
|
// logId = rs.getInt(1);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// e.printStackTrace();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// return logId;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// private void storeMessageInDatabase(String messageContent) {
|
||||||
|
// String dbUrl = ConfigUtil.getProperty("db.url");
|
||||||
|
// String dbUsername = ConfigUtil.getProperty("db.username");
|
||||||
|
// String dbPassword = ConfigUtil.getProperty("db.password");
|
||||||
|
//
|
||||||
|
// try (Connection connection = DriverManager.getConnection(dbUrl, dbUsername, dbPassword)) {
|
||||||
|
// String sql = "INSERT INTO jms_messages (message_content) VALUES (?)";
|
||||||
|
// try (PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
|
||||||
|
// preparedStatement.setString(1, messageContent);
|
||||||
|
// preparedStatement.executeUpdate();
|
||||||
|
// System.out.println("Message stored in the database successfully.");
|
||||||
|
// }
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// e.printStackTrace();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
private void sendHttpPost(String messageContent) {
|
||||||
|
try {
|
||||||
|
String apiUrl = ConfigUtil.getProperty("api.url");
|
||||||
|
URL url = new URL(apiUrl);
|
||||||
|
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||||
|
|
||||||
|
// URL url = new URL("http://localhost:17080/soa-infra/services/default/SoaLoggerProject/LogOsbInsertService");
|
||||||
|
// HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||||
|
conn.setRequestMethod("POST");
|
||||||
|
conn.setRequestProperty("Content-Type", "text/xml");
|
||||||
|
conn.setRequestProperty("SOAPAction","\"execute\"");
|
||||||
|
conn.setDoInput(true);
|
||||||
|
conn.setDoOutput(true);
|
||||||
|
|
||||||
|
String body = messageContent;
|
||||||
|
OutputStream out = conn.getOutputStream();
|
||||||
|
OutputStreamWriter wout = new OutputStreamWriter(out, "UTF-8");
|
||||||
|
// System.out.println("Writing message: " + body + " to outputstream.");
|
||||||
|
wout.write(body);
|
||||||
|
wout.flush();
|
||||||
|
out.close();
|
||||||
|
|
||||||
|
// OutputStream output = new BufferedOutputStream(conn.getOutputStream());
|
||||||
|
// output.write(body.getBytes());
|
||||||
|
// output.flush();
|
||||||
|
|
||||||
|
int responseCode = conn.getResponseCode();
|
||||||
|
// System.out.println("POST Response Code :: " + responseCode);
|
||||||
|
|
||||||
|
if (responseCode == HttpURLConnection.HTTP_OK) { // success
|
||||||
|
try (BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {
|
||||||
|
String inputLine;
|
||||||
|
StringBuilder response = new StringBuilder();
|
||||||
|
while ((inputLine = in.readLine()) != null) {
|
||||||
|
response.append(inputLine);
|
||||||
|
}
|
||||||
|
System.out.println("Response :: " + response.toString());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
System.out.println("POST request failed");
|
||||||
|
}
|
||||||
|
conn.disconnect();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user