Integrate Apache Cassandra Logging with Spring Web Application - java

I've this requirement where I need to make use of Cassandra 2.0.x built-in Logging functionality within my spring web application.
Can somebody tell me what all steps do I need to follow to achieve the same?
Thanks in advance

Related

How to connect Kafka to legacy Spring

I am working on PoC of connecting legacy Spring application to Kafka. It is war application to be deployed in Tomcat, Spring version 4.3.12. Is there some library to make communication with Kafka almost as easy as with Spring Boot? I need just fundamental operations: sending message, listening for confirmation, receiving.
I have some experience with Spring Boot support as is provided in org.springframework.kafka:spring-kafka library. I am not sure how to efficiently adopt Kafka for legacy Spring - I'm thinking of using Kafka Java client which looks promising but as I am used to working at Spring Boot abstraction level I don't have clue how much code should I supply myself.
Web search is not much helpful in this case since it tends to show Spring Boot-related solutions. Migration of legacy application is considered too, I just need to have some idea how difficult each way is.
kafka-clients is all you need (from Maven Central, not Confluent). You could go a step further and look into Log4j2 Kafka bridge, then property files for that.
If you want to externalize config into regular Java .properties file, you can, or you can pull values from environment variables, if you follow 12-factor principles.
But if you don't already have Spring Boot dependencies, then I do not think adding them is worth it for only Kafka.
Also, the Spring-Kafka documentation covers how to configure your app without Boot.

how to implement sso in my spring application using saml?

I am looking for saml integration with spring application. I have read some of documents but mostly all are based on spring boot application. Can someone help me to integrate saml in spring application for sso Or suggest the good document guide for the same.
Thanks in advance.
You should be able to take advantage of the Spring Security SAML project:
https://github.com/spring-projects/spring-security-saml
There is a sample project in the repository that demonstrates how one may be able to use the library. It's located here:
https://github.com/spring-projects/spring-security-saml/tree/master/sample
Note that the current official release of this extension builds against OpenSAML v2, and there is a develop branch that is in the process of updating to OpenSAML v3. You are welcome to try and see how that might work for you.
There is also the pac4j project which likewise, allows you build SAML2 SP support into your app and integrate with an identity provider:
http://www.pac4j.org/3.6.x/docs/clients/saml.html

How to use Spring Boot Activity Rest api in Activity App Ui

I am new to Activity process. I want to used the Activity with spring boot application. So, I want to used the rest api in spring boot and that rest api will be used by activiti-admin.war and activiti-app.war.
So, when I have deployed process from spring boot that will be available in UI and add some Listener while assigning task will be called in my spring boot app.
Can any one help.
Thanks in advance.
It sounds like you are using the version 6 Activiti build.
Both the activiti-app and admin-app already use "a" REST API to communicate to the backend, however it is not the community REST API that will be deployed with your Spring boot application (I assume you are using the Activiti spring boot starter rest).
It is not actually going to be trivial to separate the activiti-app and admin-app UI from the service layer as they are quite tightly coupled, but it is certainly possible.
While I haven't actually attempted it, it may be easiest to take the activiti-app build module (activiti-ui/activiti-app) and separate the client and server portions since the client is now a regular AngularJS application.
Is this what you are looking for?
Thanks,
Greg
I hope you are looking for something like this. It seems they are planning to support activiti app with your own spring boot application in Activiti 7.
If you are able to solve the case, please help with the sample structure. I am bit stuck with same usecase.

How to add nosql ( mongodb ) support for jsf 2.0 project?

i am writing a web application with jsf 2.0 and using primefaces framework.
i want to use mongodb as my database and "getting started" guide for mongodb is just explaining the basic java usage.
I did make it work with "public static void main(String[] args)" but unfortunately not for my web application.
it would help a lot if u could help with one of these;
"the mongodb connection for jsf 2.0" in a pseudo code or
where should the connection be defined in the project? (xml,java)
will i need any other framework to make it work ? (looked little bit to morphia)
thanks in advance :)
I would suggest you to go with JSF 2.0 and Spring integration, and along with this use Spring Data MongoDB
using the above two integrations, you would be seamlessly integrate mongodb in your web app.
If you are using spring framework, you can use Spring Data MongoDB.
There is very good documentation to get you started.

What do I need to download to start developing apps using the Spring framework?

I need to start developing applications using the Spring framework, and am wondering what tools I need to download to have me up and running.
On the SpringSource website I am seeing all these applications to download and I am wondering, do I really need all this? And what versions should I use, especially for Spring Framework?
Spring Framework
SpringSource dm Server Samples
Spring Security
Spring Web Flow
Spring Web Services
Spring Dynamic Modules
Spring Integration
Spring Batch
Spring.NET
Spring JavaConfig
Spring LDAP
Spring Extensions
Spring IDE
Spring BlazeDS Integration
SpringSource Bundlor
Spring ROO
What other applications do I need to download (eg. Struts, Glassfish, Apache, etc.)?
This depends on what you want to use Spring for. Typically that's Web applications. If so you only need two things:
Spring framework (with minimal dependencies); and
A servlet container (eg Tomcat) or a full-blown application server (eg Glassfish, JBoss).
Everything else is optional. I believe the only required dependency is Apache Commons logging. Depending on what features you use, you may well need more.
If so, here is a [tutorial][1] that creates a barebones Spring MVC project. There are countless others around for that and other topics.
It's entirely possible to use Spring in, say, a Swing application in which case you obviously don't need a servlet container.
All you need from SpringSource is the Spring Framework.
Spring 3.0 is on the way, but for now, use 2.5.6.SEC01, the current production release.
You can get started with a simple servlet container (ie: Tomcat) rather than a full blown application server (eg: JBoss, Glassfish).
The Spring Framework comes bundled with jars for web development - ie: spring-web and spring-webmvc.
See #117535 for a simple example of using Spring MVC.
It mainly dependent on what you need Spring for. Each and every piece of Spring can, actually, be used in separation from the rest. You may use it only for IOC, in this case you don't need, for example, MVC and Servlets, etc...
The easiest way to start is to dowload the main package from http://www.springsource.com/download/community?project=Spring%20Framework
You can use Spring from any IDE
The best way is to use Maven with your project. Basically all you have to do is edit your pom.xml file and tell it that you want to use Spring. Then when you compile your code, Maven will go out and automatically download the Spring libraries you need from their public repository.
Here's an example:
http://pookey.co.uk/blog/archives/63-Getting-started-with-Maven-and-Spring.html

Categories