Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6995557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:02:37+00:00 2026-05-27T20:02:37+00:00

I am using Eclipselink in glassfish to deploy an application and I’d like to

  • 0

I am using Eclipselink in glassfish to deploy an application and I’d like to use the new Eclipse 2.3 property DEPLOY_ON_STARTUP to speed up my things a little. I am using Netbean 7.0 and glassfish 3.1.1 for my development.

My question is: How can I set this up in Persistence.xml? I tried the following and it couldn’t deploy.

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence"....

  <persistence-unit name="MyPU" transaction-type="JTA">   
    <jta-data-source>myDataSource</jta-data-source>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>      

    <properties>
       <DEPLOY_ON_STARTUP>True</DEPLOY_ON_STARTUP>
    </properties>

  </persistence-unit>

</persistence>

If I have to set this property in code, how do I do that? the eclipselink wiki says:

EntityManagerFactory emf = Persistence.createEntityManagerFactory("pu-name", props);

But I am using @EJB annotation and I don’t manage the EntityManagerFactory or entity in my code.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:02:38+00:00Added an answer on May 27, 2026 at 8:02 pm

    Your approach does not work, because elements inside properties-element should be property-elements, which are name-value -pairs. Try

    <property name="eclipselink.deploy-on-startup" value="True" />
    

    instead. I am not sure does it give such a speed improvement what you are searching, according javadocs:

    This may increase startup time of a JavaEE server, but will avoid the
    first request from hanging as the persistence unit is deployed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using EclipseLink. Is is possible to use custom query function like: Select u
I'm using EclipseLink in Glassfish with my JavaEE application and have some java.util.Locale-columns in
I am using EclipseLink libraries in eclipse (at dev time) and deploy on TopLink,
I have entity model like this (using EclipseLink and JPA 2.0): @Entity class A
I am developing an application using Eclipselink and as part of the app I
I have some problems with Eclipse server adapter for Glassfish 3.1. I am using
I'm developping a mono user desktop application using SWING. I had a little experience
Is anyone successfully using OpenJPA with Glassfish? I'm trying to use OpenJPA 2.1 with
We are using Glassfish server 2.1 with Eclipselink JPA 2.1 and connect to a
I have a running web service (using EclipseLink as JPA provider) and would like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.