I have a Flex / Spring / LCDS project, and I'm trying to use the Spring/Flex integration module.
It works fine for exposing simple destinations & messaging end-points, however I'm unsure how to configure to use Assemblers.
The vanilla, no-Spring-integration-way involves declaring a destination such as:
<destination id="book.service">
<properties>
<source>flex.data.assemblers.HibernateAnnotationsAssembler</source>
<item-class>com.library.Book</item-class>
</properties>
</destination>
However, when I try to integrate this approach with Spring, I come unstuck.
This destination needs an adapter. Running as-is, allowing the Spring/Flex integration to install the default remoting adapter doesn't work, as I get the following error at rumtime:
Caused by: flex.messaging.config.ConfigurationException: Destination 'book.service' must specify at least one adapter.
How do I connect this destination to the adapter?
Also, will the HibernateAnnotationsAssember detect and integrate with the Spring managed Hibernate sessions, or does this require additional config as well?
From what I know Spring is fully integrated only with BlazeDS..you cannot expose Spring beans (assemblers) as destinations.
Related
How to improve datapower monitoring ? I want to improve our monitoring techniques say for example, want to check that all objects (FSH /MQFSHs, SSl proxy, crypto profile etc) are up and incase if it goes down , should be notified by email or something. checking number of files in file management ondisk folders.Basically validate the adapter after deployment (we use soapUi to test adapter functionality, however something else to improve or added validation).please suggest any ideas that can be implemented as a process improvement on Datapower
For example you can get the status off all your domains using this soma call. You can test this using soap UI. You can get the list of various soma calls using the datapower mgmt wsdl (available in datapower store directory).
<!-- get all the domains -->
<xsl:variable name="domainsList">
<dp:url-open target="{$XML-MGMT-URL}" response="responsecode">
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Body>
<dp:request xmlns:dp="http://www.datapower.com/schemas/management">
<dp:get-status class="DomainStatus"/>
</dp:request>
</env:Body>
</env:Envelope>
</dp:url-open>
</xsl:variable>
Try using SOMA commands of XML management interface to check the object status.
I am not sure if this is the best approach but this is how i have implemented it. You can always create a testing service in DataPower with/without interactive java application to perform all the soap test you are performing using soapUI. You can perform SOMA/AMP calls to check the status of objects, ping external services, etc. You can schedule these test on a regular interval or manual.
Depending how you set it up, you can either generate an email with status of each object/service you are testing or create a html dashboard that records the current status of everything.
I would like to know the way for resolving this integration scenario:
Execute different queries to select X elements from a database. I am
looking for an inbound adapter without pooling because it is just
necessary to execute the query once. Although, results of the queries
will be generate only one output.
Work with this data to build a SOAP request (generic web service)
Send this SOAP request to a web service and wait for an asynchronous response.
But also, it is necessary to deploy all this scenario in a WAR file on Tomcat server. I am deploying the application from a spring MVC + spring integration skeleton but I will not have any controller. Is it possible to execute the application when context was loaded on Tomcat?
I am working with the next technologies:
Spring integration
Spring MVC for a WAR deployment
Scheduling (Quartz or #Scheduled)
Spring WS
Regards
Since you say that you'd prefer to select on the application start up and only once, you can use:
<int-event:inbound-channel-adapter channel="jdbcChannel"
event-types="org.springframework.context.event.ContextRefreshedEvent"
payload-expression="''"/>
and <int-jdbc:outbound-gateway query="SELECT * FROM ..."/>
And so on to the WebService.
UPDATE
Since you say that you are around Anotation configuration, consider to use Spring Integration Java DSL.
To configure <int-event:inbound-channel-adapter> from #Configuration you should do this:
#Bean
#SuppressWarnings("unchecked")
public MessageProducer ApplicationEventListeningMessageProducer() {
ApplicationEventListeningMessageProducer producer = new ApplicationEventListeningMessageProducer();
producer.setEventTypes(ContextRefreshedEvent.class);
producer.setPayloadExpression("''");
producer.setOutputChannel(jdbcChannel());
return producer;
}
ContextRefreshedEvent info you can get from its JavaDocs or from Spring Framework Manual.
The ESB Toolkit 2.1 has the ALL.Exceptions send port using the old SQL adapter.
But the BizTalk Health Monitor reports ...
Non WCF SQL adapter used in some Send Ports
Prefer to use the WCF one which is more performant !
Is there any way to update to the WCF.SQL adapter?
Yes this is possible. It will however include some custom development.
You will need to create a map between the FaultMessage schema (in Microsoft.Practices.ESB.ExceptionHandling.Schemas.Reporting.dll) and the usp_insert_Fault schema (created using the Consume Adapter Service in Visual Studio, from the usp_insert_Fault SP in the EsbExceptionDb database), as the old SQL Adapter uses a different schema layout to execute a stored procedure.
Required Steps:
Change the Transport Type of the ALL.Exceptions port to WCF-SQL
Set the Address: mssql://SQLServer:1433/SQLInstance/EsbExceptionDb?
Set the Action: TypedProcedure/dbo/usp_insert_Fault
Change the ESBFaultProcessor Send Pipeline to use your custom map in the ESB Transform Component
EDIT: Note: The solution described here does not include the Message and its Context like the map with the SQL Adapter does. To accomplish this, you should make use of Composite Operation to insert into multiple tables in one transaction.
I have two local Grunt+Bower-projects with typical build and watch/serve tasks:
Client contains the client to be publicly released
AdminClient is an extension to client intended for internal administration use
AdminClient should re-use Client code and build-result. watch/serve must behave transparently for any change in Client and AdminClient.
How can I do this with Grunt+Bower?
It is a basic problem solved in C# with project dependency and in java typically with maven sub-modules.
You can have the Client configuration in a separate file that you extend in the AdminClient.
var common = require("common.js");
...
grunt.initConfig(common.config);
Hi i am new to oracle coherence,
Question 1 : my scenario is, i have to implement the oracle coherence replicated cache in my webapplication.(with weblogic server).the coherence should be the part of the weblogic server means when i start the weblogic server the coherence should start
(both should run in the single JVM).please help me how to do it ?
Question 2 : whether i need a database to maintain the records or oracle coherence it self maintain in file system ? if yes means how and what will happen for the cached data when i shutdown the server?
Q1:
I would describe it in couple of steps:
Place coherence.jar in the classpath. Depending on specific case it can be WLS classpath or application's classpath. Unless you want to share coherence node between many applications it is often a better idea to put it to application's classpath. It also has other advantages like easier maintenance.
Prepare your own cache configuration for the replicated topology. You can skip this step if you want to use coherence default cache configuration coherence-cache-config.xml which includes replicated topology, but keep in mind that your cache name must start with repl- and this is in general not recommended for production. Otherwise put the following to your custom-cache-config.xml file and add it to your application's classpath.
<?xml version="1.0"?>
<cache-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://xmlns.oracle.com/coherence/coherence-cache-config"
xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-cache-config
coherence-cache-config.xsd">
<caching-scheme-mapping>
<cache-mapping>
<cache-name>my-repl-cache</cache-name>
<scheme-name>replicated</scheme-name>
</cache-mapping>
</caching-scheme-mapping>
<caching-schemes>
<replicated-scheme>
<scheme-name>replicated</scheme-name>
<backing-map-scheme>
<local-scheme/>
</backing-map-scheme>
<autostart>true</autostart>
</replicated-scheme>
</caching-schemes>
</cache-config>
Create a ContextListener for your application and place the following code into contextInitialized method:
// join existing cluster or form a new one
CacheFactory.ensureCluster();
Start your WLS with the following option:
-Dtangosol.coherence.cacheconfig=custom-cache-config.xml
Deploy and start your application (possibly on many servers)
Q2:
In general coherence is in memory solution and doesn't persist data by default. If you need to manage data in persistent store you can look into CacheStore interface. This is described here in the documentation.
Keep in mind that often you have more than one coherence node in the cluster so you will not lose your data when you shutdown one of them because data is always stored also in other JVM(s). When you restart your node it will join the cluster and your data will be there.
Starting with WebLogic 12.1.2, there is excellent Coherence integration via the "Coherence Containers" functionality of WebLogic, in addition to the ActiveCache feature of WebLogic. Here is a URL for the container feature: http://docs.oracle.com/middleware/1212/wls/WLCOH/deploy-wls-coherence.htm
For the sake of full disclosure, I work at Oracle. The opinions and views expressed in this post are my own, and do not necessarily reflect the opinions or views of my employer.