I have Java application running on JBoss AS7 standalone. The application needs to monitor an FTP folder and pick up new files.
I'm aware of using commons-net FTPClient to connect to an FTP server, but I'm curious, is there a way to do this in the 'Enterprise Java' world? For instance, configuring an FTP server as a 'datasource' in JBoss, in a similar way to databases?
From googling, I've found things such as JBoss ESB that can be used with JBoss AS, and for which you can configure an 'FTP listener' to monitor for files - is this the way forward? (don't currently have JBoss ESB installed)
I've also come across the notion of using JCA, such as 'Oracle jca adapter for files/ftp', which mentions being compatible with JBoss, but there seems to be little info online about it. another is 'jca-for-ssh' but appears to only support outbound connections.
Am I going about this right way/googling for the right thing? Any pointers in the right direction are much appreciated. thanks
There are two ways to do it.
One would use the Java 7 FileWatcher. This would be an efficient, event-based solution.
Another would have a Timer task that would wake up periodically, check the directory for files, process them, and then go back to sleep.
JBoss would not be my first thought, but it's possible to incorporate either one into an object of some kind and deploy on JBoss.
Related
Background Context:
Due to enterprise limitations, an uncooperative 3rd party vendor, and a lack of internal tools, this approach has been deemed most desirable. I am fully aware that there are easier ways to do this, but that decision is a couple of pay grades away from my hands, and I'm not about to fund new development efforts out of my own pocket.
Problem:
We need to send an internal file to an external vendor. The team responsible for these types of files only transfers with SFTP, while our vendor only accepts files via REST API calls. The idea we came up with (considering the above constraints) was to use our OpenShift environment to host a "middle-man" SFTP server (running from a jar file) that will hit the vendor's API after our team sends it the file.
I have learned that if we want to get SFTP to work with OpenShift we need to set up of our cluster and pods with an ingress/external IP. This looks promising, but due to enterprise bureaucracy, I'm waiting for the OpenShift admins to make the required changes before I can see if this works, and I'm running out of time.
Questions:
Is this approach even possible with the technologies involved? Am I on the right track?
Are there other configuration options I should be using instead of what I explained above?
Are there any clever ways in which an SFTP client can send a file via HTTP request? So instead of running an embedded SFTP server, we could just set up a web service instead (this is what our infrastructure supports and prefers).
References:
https://docs.openshift.com/container-platform/4.5/networking/configuring_ingress_cluster_traffic/configuring-externalip.html
https://docs.openshift.com/container-platform/4.5/networking/configuring_ingress_cluster_traffic/configuring-ingress-cluster-traffic-service-external-ip.html#configuring-ingress-cluster-traffic-service-external-ip
That's totally possible, I have done it in the past as well with OpenShift 3.10. The approach to use externalIPs is the right way.
Hi I am trying to use infinispan as a remote caching solution and when following through the guide i see the following:
> This server provides easy to use RESTful HTTP access to the Infinispan
> data grid, build on JAX_RS. This application is delivered (currently)
> as a WAR file, which you can deploy to a servlet container (as many
> instances as you need).
I could not find the WAR in the 5.3.0.Final.
But i see that Infispan Server installation can serve as a Remote Data Grid, so is the REST interface included in the server installation with the latest release?
If yes
What server is it running on ?
Do we need licence to run the Server on enterprise level?
What is the good way to deploy it in any other Application Server?
Any help will be highly appreciated?
But i see that Infinispan Server installation can serve as a Remote Data Grid, so is the REST interface included in the server installation with the latest release?
We will be talking about this: https://github.com/infinispan/infinispan-server Answer is, I'd say, yes. When you will use Infinispan Server, you will have possibility of accessing Infinispan cache via REST endpoint. (see readme + see endpoint subsystem in, for example, standalone.xml configuration file) After start of this standalone server you can connect to http://127.0.0.1:8080/ (REST server) and start using it according to the rules described in the documentation.
What server is it running on ?
The whole Infinispan server is very based on JBoss AS. Imagine "big" JBoss AS minus all unnecessary systems, subsystems and functionality. This "little boy" is Infinispan Server which, for example, doesn't support deploying applications etc.
Do we need licence to run the Server on enterprise level?
No. This is open source project. If you still looking for "officially" supported version, I'd suggest you to check Red Hat's JBoss Data Grid solution, which is productized and supported Infinispan + Infinispan Server. See http://www.redhat.com/products/jbossenterprisemiddleware/data-grid/
What is the good way to deploy it in any other Application Server?
There is no such a way. As I mentioner earlier, Infinispan Server itself is standalone server which already contains everything you need for caching and running cluster of virtually 128 (or even more) nodes.
Any help will be highly appreciated?
Maybe. I can't answer this question properly :(
I want to exchange E-Mails from a locally installed Microsoft Outlook through a Java Application which is running on a Tomcat Server.
In the past this was no Problem but since we switched the tomcat server from a "normal" starting routine to be started as a service (which is done for performance reasons) my Connection to Outlook is not working anymore.
As I was searching for a Solution to this quite for a long time (with no found solution) I decided to leave a post here.
I already know, that
The Outlook Object Model is unsuitable to run in a Windows service
which can be found at http://support.microsoft.com/kb/237913. Due to the registry hive HKEY_CURRENT_USER which is not loaded when a service is started.
But in this case I think a simple 'No - that’s not possible' can’t be a solution and that’s why I am asking here for help.
Is it for example possible to let the application on the tomcat start a new local application which then connects to Outlook?
Is it possible to manually load the HKEY_CURRENT_USER hive?
or on the other hand do this by using a solution which I did not mention yet?
Thanks a lot in advance!
You probably need to create a plugin to outlook which submits the email to your application using web-services (or similar).
I believe this is the usual way of realising requirements like this.
I just need notification system. javax.jms.* - good solution I think, but I can't understand what do I need to use JMS?
I don't want to use any app. servers like GlassFish or Tomcat, I just would like to use standard jdk and myserver(very light) and myclient(very light too) and some MessageSystem to exchanging bitween myserver and myclient. As I understand to use JMS I need JMS Provider. For example: ActiveMQ. But I don't uderstand ActiveMQ needs any server?(GlassFish probably), and what kind of *.jar do I need from Java EE ?
JMS provider or more correctly a Message Broker can be a stand-alone application. Most of J2EE app servers include a broker inside them but yes we also have many very good stand alone JMS brokers, ActiveMQ is good, then there is OpenJMS and many others. And as they are stand alone they don't need another app server to run them. And they usually come with every needed jar as well :) SO you'll not need to copy any jar from other app-server to say ActiveMQ or OpenJMS.
ActiveMQ runs as a standalone server; it requires the Java VM like any Java application but nothing else beyond that.
Other stand alone JMS brokers (open source) which can be run standalone or even embedded in your Java application are Open Message Queue (OpenMQ) which is also included in GlassFish, and the new JBoss HornetQ message broker which will be the JMS implementation in JBoss application server.
In the BEA WLS console, it's possible to define "T3 File Service". After googling about it, I was unable any practical info. Is it something useful ?
EDIT:
Deprecated since 6.1 ... a complete overview here , it's sad that no real alternative is provided.
The WebLogic file T3 service lets you provide high-speed, client-side access to native operating system files on the server.
Some people used it (with weblogic 6.1) to upload file attachments to an application in a cluster (in a C/S context I guess). Whether this was actually a good use case is another story.
Anyhow, the File Service has been deprecated in Weblogic 7.0, it just hasn't been removed for now (see the FileT3 in Weblogic 8.1 documentation or File T3 in Weblogic 10.0 documentation). If you need to write to the server file system, you'd better find another solution.
The T3 protocol is (was) a proprietary network protocol for Java object serialization and RMI (before there even was an official RMI). It was used to communicate within a cluster of WebLogic servers (and between servers and clients).
It is deprecated now, so unless you know what you need it for, you probably do not need it.