Architecture problem

77 views
Skip to first unread message

onclez...@gmail.com

unread,
Jun 15, 2016, 5:51:39 PM6/15/16
to Sculptor Generator
Hi everybody !

I want to integrate a simple rule engine. This rule engine needs to access the database for some operations (actually viia the core). But the core needs the rule engine to validate some DTOs/Entities !!! So Maven throws an (normal) cyclic reference error !!

Is there a simple way to separate the access modules (DAOs) from the business core module ? I mean having a maven module for business services and an other only for DAOs.
The same problem for an other maven module to externalise batchs that needs to access the database (actually via the core) and the core needs to access the batch module to configure batchs...

The last point, and not the least, the core generate a client artefact with services interfaces, DTOs, entities, exceptions and enumerations... So all others modules needs this module but this module is depends of the core module (classifier tag). So the cyclic reference can appear...

Any suggestions ?

Regards

onclez...@gmail.com

unread,
Jun 20, 2016, 6:04:59 AM6/20/16
to Sculptor Generator
Hi everybody

So, no way to separate persistence from the core module simply ?? For my project, it's critical. The choice of Sculptor could be called into question by my superiors, to my great regret !!
Maybe it's not possible...

Thx for help !

Torsten Juergeleit

unread,
Jun 25, 2016, 6:22:08 AM6/25/16
to Sculptor Generator
Sculptor generates the repository / access interfaces and the implementation in separate Java packages. You can use the Maven JAR plugin (with include / exclude files sets) to create multiple JAR files in your core module.

But this will not keep you from cyclic references due to poor design. Approaches for breaking cycles can be found here.
Please keep in mind that despite of using Sculptor it's still necessary to use good design principles, e.g. modularization, inversion of control / dependency injection, refactoring cross-cutting concerns into custom base classes, ...

/Torsten

onclez...@gmail.com

unread,
Jul 6, 2016, 10:55:07 AM7/6/16
to Sculptor Generator
Hi Torsten,

Thx for reply.

You're right. I modify the application architecture and separate services from repositories (2 sculptor projects) and everything all right now.
Things are more flexibles !!

Bye !!



Le mercredi 15 juin 2016 23:51:39 UTC+2, onclez...@gmail.com a écrit :
Reply all
Reply to author
Forward
0 new messages