Announcement Announcement Module
Collapse
No announcement yet.
Can't read Blob from read-only datasource Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can't read Blob from read-only datasource

    Hello!
    We have a configuration of multiple datasources, where one of them is used for read-only access and has thus no transaction manager configured (the jndi datasource on wls that is involved is non transactional). Now we have a jpa entity with a blob field, that we can't read, because we get a connection reset exception once we try to access the Blob's InputStream. If on the other hand we create the EntityManager ourselves like:
    @Autowired
    private EntityManagerFactory entityManagerFactory4Geoportal;

    ....

    EntityManager entityManager = entityManagerFactory4Geoportal.createEntityManager ();
    entityManager.getTransaction().begin();

    ....

    entityManager.getTransaction().rollback();
    then everything is fine.

    Now, that's not very pretty, so what am I doing wrong?
    (Configuring a xa datasource is not an option)
Working...
X