How to make my two application running on JBoss interact With each other - spring

I am new to Web development, There are two applications running on the JBoss on same machine,my requirement is that from one application I need to consume some services of other application, I should not use Rest Services,I am new to this web development, Please some one help me in this

Related

Is it ok to connect two camunda instances to the same database?

We are developing a spring boot application(generated with jhipster, with oauth) and we want to use camunda.
The camunda spring boot starter(with the process engine only) worked, however the we had problems with the other two starters(rest, web) in our current setup(although they work with a simple project like in the camunda examples).
We actually prefer using the embedded process engine like this, however, we would like the operational advantages of the camunda webapps.
The preferred solution we thought about was to connect to the same database another process engine(camunda standalone or springboot app with camunda web starter). This seems to be working in our tests.
The other solution would be to use camunda standalone and communicate via rest api, and subscribe to topics for service tasks.
Do you see any problems with the preferred solution?
Yes, it's perfectly fine running two engines against same database. Just make sure to set camunda.bpm.job-execution.enabled=false in the other instance(if you don't want it to pick up and execute jobs)

Does Spring Boot needs to be run on AppServer like Weblogic?

I have used only Spring framework and deployed as spring boot application It just opens and runs as a java application , Why do a companies with only spring framework runs on app server they can run on JAVA application as usual ? why do they need App server? What all can an app server does ?
Application servers are usually designed to host multiple applications, and manage a set of services that are used by all these applications. These services might include transaction management, timers and task management, HTTP request routing, a message broker (for inter-process communication, among other things), user management, etc. There's usually a graphical or command-line management console, or both.
The Spring framework is usually used to build a single, mostly-self-contained application. Spring does provide common services like transaction management, although they typically require a deal more developer understanding than is the case with, say, a JEE appserver.
There are all sorts of application containers and frameworks, offering different kinds of services in different ways. Often there is no killer reason to pick one over the other, and they are to some extent interchangeable. Spring Boot seems to be rising in popularity right now, because (perhaps) of its better fit to the microservices-type development models that are currently popular.

Angular2 application with springboot using maven

I am new to Springframework. I created a Springboot application and expose rest services. Now I want to consume my rest services in angular2. I am not sure how to create folder structure for my application. Should I create angular2 app in src/main/resources folder using angular cli? or as I am exposing rest services so should I create a separate angular project and consume the services? But if user this approach it will run on two different ports on localhost and I get CrosOrigin error.
In production I will deploy the application on same server. It will be a one website.
One more point I am using Maven and STS tool suit to create springboot application.
For a Spring-Boot novice using AngularJS you might be checking out JHipster (which actually is a combination of these two projects), which might serve you with some best practices.
Currently based on AngularJS 1 - it's not Angular2 yet - however they're busy porting it to version 2 (see progress, see this branch).
Alternatively there's also a guide on how to create a standalone Spring-Boot application with AngularJS (1).
I find some sample code but even in Springboot application you have to run spring and angular application on two different ports on local host. So the best way to solve the problem is to create two application expose services in spring boot and use in angular client side. While running on local use enable CORS.
Another way is to use JHipster. They recently release JHipster 4 which support angular 2.

Does application server provides what spring can provide

Bit confused with Spring framework and what capabilities application server provides.
I was reading this answer on same site
There he says,
Additionally App Server have components and features to support
Application level services such as Connection Pooling, Object Pooling,
Transaction Support, Messaging services etc.
That means we can optionally use apis of application server to manage transaction in our web application (inject web application :()and I think spring also provides transaction apis. So whats the difference?
Please, help me to make it clear. Thanks you.
When you use app server resources (transactions, connection pools etc.) directly in your application code, you can only run it when it is deployed on an application server or even worse only on that syme type of application server.
Spring allows you to use those resources and configure your application for different environments. The application can be run on any application server or on a simple Tomcat, or on different servers in the cloud.
Spring also allows you to run your code in tests (unit tests) without the need to start up an application server. This is absolutely needed to write automated tests.
Everything that can be done with an application server, can be done with spring as well.
There is a whole world of spring libraries and framework that provide features that are not available directly on application servers.
I can really recomand to give spring a try.....

How to deploy a spring integration component?

I've developed a spring integration component that is to sit on a server and process messages coming in over an inbound RMI channel do some processing/filtering and then send out some messages over a different RMI channel.
Currently, for testing, I've been running it using a Main class that just loads the context, which sets up the inbound RMI gateway and it's working fine. But I don't think that this is appropriate for a production environment.
What is the best way to deploy this type of project to a server?
If I were working in a .Net I'd be deploying this type of application as a windows service, is that what I should be doing here?
The application that is sending me data is hosted in Tomcat, would it be a good idea to also run this application within the same Tomcat container (Current requirements are for both components to be on the same machine this may change)? And if so how?
I'm currently looking into Spring Boot, am I on the right path?
I think the best would be Spring Boot, as it's made to easily allow running different types of applications. Also, you don't need Tomcat if you can run the same component with a simple Main and not using UI. Spring Boot, also, has a sample using Spring Integration here, so you should be up and running in no time.

Resources