Hello,

I am currently looking into Drupal as a solution for my work place. All of the applications at my work place are all written in Java. We are trying to stay uniform and keep using java. We are very interested in Drupal but I need to know if I can create custom modules for our site using Java and if they will work with Drupal? Would all modules be able to run on the same server?

Any information would be appreciated.

Thank You.

Comments

WorldFallz’s picture

Drupal is written in php and drupal modules must be written in php. Drupal can communicate with other apps using standard methods (ie web services), but drupal modules are php.

alexmc’s picture

Sorry for answering this months late.

I wonder what custom modules you want to create?

If you want to create J2EE style servlets or JSP then no - there is no easy integration.

Drupal is a LAMP style application with MySQL as the back end database. You *might* want to use something like Hibernate to reverse engineer the database schema and create Java classes to read from the database, but that would be pretty limited. It wouldn't easily know how to write to the database and wouldn't be integrated with the UI at all.

srinikasturi’s picture

Hi,

Stumbled upon this question. Have you checked for Resin. Google for "Drupal Resin" - it is a Java wrapper for Drupal. There's some performance improvement being claimed as well. I am not aware of anyone who has done this in a production environment, though.

Good luck, and do post an update on what you've decided to do and how you progress.

david.wery’s picture

Here is a very interesting link : drupal-java-integration

Hope it help...

David
Calysis

ashwinparmar’s picture

Yes, You can create Web Service in Java and use that as a Microservice decoupled components in Drupal. 

e.g.: Contact Us form, User GDPR Consent, Privacy data, External API development and use in Drupal. Use Spring-Boot Framework

Output format: Json, Xml etc.