Comments (10)
You say that select operation works as expected (you see the sql in log) and the insert operation doesn't work?
from pf4j-spring.
yes , select is working and insert not working, i have set hibernate show sql flag as true and select statements are getting logged where as insert not , and there is no any exception
from pf4j-spring.
It's strange. I don't see how PF4J can lead to a such behavior. You can put PF4J log on debug (or trace) level to have more information but again.
from pf4j-spring.
i have tried like created data source in plugin and not sharing application of main then it is working
but i wanted to share application context like parent - child , use only one data source which is created by parent application context
let me explain what i am trying to achieve is there will be parent app context which is main will create child context for plugins for the same i have written code like this
AnnotationConfigServletWebServerApplicationContext appContext = (AnnotationConfigServletWebServerApplicationContext) pluginManager.getApplicationContext();
AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext();
applicationContext.setClassLoader(getWrapper().getPluginClassLoader());
applicationContext.setParent(appContext);
i have created data source in parent context only and in plugin i am just using parent context has data sourec, in spring jpa config injected data source and created entity manger factory for plugin
one thing here is data source created by root application class loader and child entities and entity manager factory is created bu Plugin class loader - may be this causing something
do you have any thing on this?
from pf4j-spring.
Did you tried to search in closed issues, to see if you find a solution?
from pf4j-spring.
Yes, i have gone through these issue , so i came to know about context sharing and parent child relation context.
Spring beans are also resolved using annotation itself service is created, spring JPA repository object is also created
if i set hbm2ddl.auto propert as create the its also creating table for the same entity which is part of plugin
only on save - there is nothing happen, no log no exception
from pf4j-spring.
And #7?
from pf4j-spring.
i am able to discovered controller and services that is not issue.
issue is in while saving data using hibernate , in my plugin has Spring JPARepositry (org.springframework.data.jpa.repository.JpaRepository) used to deal with db operaition
only thing is data source is created at parent context and same data source using in child context which is plugin
from pf4j-spring.
@Prashanttorat
I don't know how can I help you. I don't use Spring in my applications. You have a lot of information about how pf4j and pf4j-spring work. pf4j-spring is a very light project and you can dive in sources very easy.
Maybe other people that use Spring can help you.
from pf4j-spring.
Hi Decebal Suiu, Thanks for help, issue resolved, i was trying use same entity manger and transaction manager which is created by parent context, which is actually false, Scope is different of parent main context and plugin context
i have just created Entity manager Factory and transaction in plugin context now it is working perfectly as expected
from pf4j-spring.
Related Issues (20)
- Concrete bean could not be received from the application context HOT 1
- SpringPlugin start/stop/start results in Exception HOT 2
- Loading plugin on-runtime : Ambiguous hander methods mapped & ConcurrentModificationException when unregistering routes
- I use it SpringPluginManager, It seems to be a single case. HOT 4
- How to update the βList<Greeting>β while some plugins unloaded and deleted? HOT 4
- How to add integration tests for the plugin?
- self contained example HOT 1
- Jpa in plug-in not working HOT 1
- Hi author, Can I send a pull request to PF4J-Spring to support the Spring parent-child context οΌ
- Injecting beans from plugin in application doesn't work HOT 2
- run exception on pf4j-spring demo
- pf4j plugin needs to refresh and detect changes automatically with spring HOT 6
- How to get this repo versions release notes? HOT 2
- Problems with Using Pf4j-Spring HOT 1
- The real implementation cannot be accessed through the api interface. HOT 2
- When 'spring-boot-devtools' is introduced in the project, the extensions are not available. HOT 2
- How do you extend with kafka HOT 1
- Retrieve Resource from Inside Plugin HOT 1
- When will plan support Spring6.x ? HOT 6
- Is there a plan to release version 0.9.0 or 0.8.1 to incorporate the changes from commit 5d26e9b? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pf4j-spring.