Skip to main content
10-Marble
November 29, 2017
Question

Best practices for using Guice in Windchill customizations

  • November 29, 2017
  • 1 reply
  • 1856 views

Dear all,

we use Guice in many of our customizations and even though it work fairly well I have started to think a bit about how to do this in a manner that follows some sort of best practices. There are many entry points into Windchill customizations such as service startups, action validators, form processors, data utilites and so on and because of that I often find myself creating multiple instances of the Guice Injector class in order to instantiate my objects via Guice. 

 

It seems to me that since Windchill is a (more or less) Spring based web applicaion threre should be some way of loading modules and creating an injector in a way that allows me to create it once and then reuse throughout my various customizations. 

 

Has anyone else managed to find some sort of best practice aproach to this or is there anyone who has some ideas and/or opinions on this subject? Any input will be greatly appreciated. 

 

Best regards

Daniel Södling 

 

1 reply

15-Moonstone
November 30, 2017

Hi,

I've bever used Guice in PDMlink, but just a remark. PDMLink is not a Spring app. It uses some Sptring elements, like controllers, but nothing more.

But maybe it's enough to use Guice 🙂 I'm intersted to know if it works.

 

dsodling10-MarbleAuthor
10-Marble
December 3, 2017

Thanks for the clarification, that makes one less path to investigate. 

I'll let you know if I figure something out.