views:

83

answers:

1

Hi there, I'm a salesforce newbie and I need to integrate java business logic with apex pages. Is it possibile to do it without using vwmforce? Note that I have to include my own and third party libraries as well. Is there any tutorial/resource about that?

Thanks in advance

+2  A: 

You could perform callouts from Salesforce to your separate Java code (as long as it's exposed as webservice or at least can accept HTTP message).

  1. Read about Integration on the Force.com platform, there are many possibilities and examples.
  2. In the API documentation most of the time there are Java code snippets listed, for example for creation of new records (scroll down to the middle of the page, "#" anchors seem to be brokes so I cannot give a direct link).

Generally you can both "push" (send from Salesforce notifications when something happens, synchronously or not) and "pull" data (periodically ask from your Java application for changes or send INSERTS etc. whenever something happens on your side).

But if you want to run your Java on Salesforce server and not on your own machine - tough, vmforce might be the only option. I haven't tried this one yet.

In the end under the Apex, Visualforce etc. there are Oracle databases and Java (with JSP), but I doubt they'll grant access to it ;)

eyescream
And if I want to use my own java on sf in order to manage my documents stored on sf? Things are getting worse :\
Giancarlo
Maybe try to write us exactly what is your "business requirement" so we could help with your specific problem. Maybe all can be done directly on the platform without the need of any custom coding (be it in Java, Apex or something else).
eyescream
My requirement is: visualforce page to upload documents; when a document is uploaded, my own java code writes some stuff within the document... I think vmforce will be the only solution...
Giancarlo
Maybe you could write a "before insert" Apex trigger for Document object to handle this update. If not - visualforce page + apex controller that would extend standard Document controller (or even rip off pieces of HTML used in normal Documents tab)... As far as I remember documents are stored in DB encoded in base64, so it's not too difficult to modify them. Last but not least - you could upload them from your own application using API and skipping the visualforce etc. entirely.
eyescream