How can I connect to a relational database from AEM | Community
Skip to main content
Level 2
January 21, 2016
Solved

How can I connect to a relational database from AEM

  • January 21, 2016
  • 1 reply
  • 588 views

I want to know how to connect to MySQL from AEM. Whats the best way. 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

You can use dependency injection and inject a DataSourcePool into an AEM Service. Once you successfully inject a DataSourcePool into an AEM service, you can use SQL commands to interact with MySQL. For information on how to work with DataSourcePools in AEM, see this community article: 

Injecting a DataSourcePool Service into an Adobe Experience Manager OSGi bundle

1 reply

smacdonald2008
smacdonald2008Accepted solution
Level 10
January 21, 2016

You can use dependency injection and inject a DataSourcePool into an AEM Service. Once you successfully inject a DataSourcePool into an AEM service, you can use SQL commands to interact with MySQL. For information on how to work with DataSourcePools in AEM, see this community article: 

Injecting a DataSourcePool Service into an Adobe Experience Manager OSGi bundle