Is the location where I expect these .jar's the restricting factor, or is it the fact that I want to load .jar's that were added after deployment time?
I can't use OSGi. By custom SPI you mean "Service Provider Interface" and by own loader you mean an implementation of Tomcat WebappClassLoader? Do you have any hints? I was told to do this through CDI. Then I was told to do this through EJB. Are you sure it can only be done with OSGi? Thanks! Op zaterdag 18 mei 2013, om 01:22 heeft Romain Manni-Bucau [via OpenEJB] het volgende geschreven: > In java only OSGi could do it but you ll loose a lot of the simplicity you > have ATM.... > > Maybe just using a custom spi with your own loader would be enough but i > really doubt of the use case (+ i think it should be forbidden in prod) > Le 18 mai 2013 01:06, "Caroline" <[hidden email] > (/user/SendEmail.jtp?type=node&node=4663043&i=0)> a > écrit : > > > I have a web application which provides an interface A. Upon receiving a > > request from a client, with implementation names in it, I want my web > > application to look in a certain folder /my/folder/*.jar on my TomEE for > > these implementations to interface A. Then, I want my web application to > > use those implementations. > > > > Previously, using CDI Injection and a jars.txt " I was able to exactly do > > that, using beans I added before deployment. > > > > > > Furthermore, I want my web application to be able to find beans that were > > added in this particular /my/folder/*.jar AFTER deployment time. > > > > An example: let's say I have AImplOne implements A in a .jar in > > /my/folder/. My web application is deployed. A client requests an action > > with AImplOne. My web application is able to instantiate an AImplOne object > > > > through A a = InitialContext.lookup();. A client requests an action with > > AImplTwo. This implementation is not available in /my/folder/ and the web > > application is not able to instantiate an AImplTwo object. I add a .jar > > with AImplTwo implements A to /my/folder/. A client requests an action with > > > > AImplTwo. This time, a .jar containing AImplTwo IS available in > > /my/folder/. The web application is able to instantiate an AImplTwo object > > through A a = InitialContext.lookup();. > > > > > > I was trying the above with CDI previously, until I learned from you guys > > that is impossible. I was under the impression I could do this with EJB's. > > > > > > Op zaterdag 18 mei 2013, om 00:45 heeft Romain Manni-Bucau [via OpenEJB] > > het volgende geschreven: > > > > > You can't update on the fly dropping jar in a war (wouldnt mean anything > > > seems app is linked at startup). Not sure what you expect here but maybe > > > have a look to jrebel or fakereplace. > > > > > > If you want just autodeploy an app (not a part of app) we have it now > > > through deployments config in tomee.xml or openejb.xml but i think thats > > > not what you want at all. > > > > > > Can you explain your need please? It sounds like youll break the memory > > at > > > a moment doing it this way... > > > Le 18 mai 2013 00:29, "Caroline" <[hidden email] > > (/user/SendEmail.jtp?type=node&node=4663041&i=0)> a > > > écrit : > > > > > > > Awesome :) > > > > > > > > I learned the JNDI names are printed when I start my webapp. > > > > > > > > Using your instructions on my sample project, I was able to load > > in-project > > > > implementations through "java:comp/env/plaininput". > > > > > > > > I can load implementations from an outside jar with > > > > "java:global/Aree/sqlitereadonlyreasoner". > > > > This works when I: > > > > - put a dependency to the jar in my pom.xml; or > > > > - define a VirtuallWebappLoader for /a/folder/*.jar through > > context.xml; or > > > > - add /a/folder/*.jar to jars.txt > > > > > > > > However, I can't seem to come up with a configuration that allows me to > > > > > > > > drop > > > > in *.jar files AFTER deployment and load them through an > > > > InitialContext.lookup(); call. > > > > > > > > > > > > I read > > > > > > > > > > http://openejb.979440.n4.nabble.com/stand-alone-Application-looks-up-remote-EJB-by-global-jndi-name-td4663033.html > > > > but 1.6.0-SNAPSHOT of May 17 isn't doing it yet for me either. > > > > > > > > > > > > > > > > > > > > -- > > > > View this message in context: > > > > > > http://openejb.979440.n4.nabble.com/EJBContainer-No-provider-definition-found-tp4663028p4663040.html > > > > Sent from the OpenEJB User mailing list archive at Nabble.com > > > > (http://Nabble.com) ( > > http://Nabble.com). > > > > > > > > > > > > > If you reply to this email, your message will be added to the discussion > > below: > > http://openejb.979440.n4.nabble.com/EJBContainer-No-provider-definition-found-tp4663028p4663041.html > > > To unsubscribe from EJBContainer No provider definition found, click > > here ( > > ). > > > NAML ( > > http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml > > ) > > > > > > > > > > > > -- > > View this message in context: > > http://openejb.979440.n4.nabble.com/EJBContainer-No-provider-definition-found-tp4663028p4663042.html > > Sent from the OpenEJB User mailing list archive at Nabble.com > > (http://Nabble.com). > > > If you reply to this email, your message will be added to the discussion > below: > http://openejb.979440.n4.nabble.com/EJBContainer-No-provider-definition-found-tp4663028p4663043.html > > To unsubscribe from EJBContainer No provider definition found, click here > (http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4663028&code=Y2Fyb2xpbmUudmFuLmRlbi5oYXV3ZUBnbWFpbC5jb218NDY2MzAyOHwxNzgxOTg5MTAw). > NAML > (http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml) > -- View this message in context: http://openejb.979440.n4.nabble.com/EJBContainer-No-provider-definition-found-tp4663028p4663045.html Sent from the OpenEJB User mailing list archive at Nabble.com.
