Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

Commit

Permalink
misc bugs
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.caucho.com/home/svn/svnroot/resin/trunk@10282 9c94448d-38f1-0310-a231-d98308ff1ebf
  • Loading branch information
ferg committed Nov 11, 2014
1 parent 6491c54 commit e69f32f
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 3 deletions.
4 changes: 4 additions & 0 deletions bin/resin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ if test -z "${RESIN_HOME}"; then

bin=`dirname $script`
RESIN_HOME="$bin/.."
fi

if test -n "${RESIN_HOME}"; then
cd "${RESIN_HOME}"
fi

exec $JAVA_EXE -jar ${RESIN_HOME}/lib/resin.jar $*
4 changes: 4 additions & 0 deletions bin/resinctl.in
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,8 @@ if test -z "${RESIN_HOME}"; then
RESIN_HOME="$bin/.."
fi

if test -d "${RESIN_HOME}"; then
cd "${RESIN_HOME}"
fi

exec $JAVA_EXE $JAVA_ARGS -jar ${RESIN_HOME}/lib/resin.jar $args $*
1 change: 1 addition & 0 deletions conf/health.xml
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,7 @@
<report>Summary</report>
<period>7D</period>
<snapshot/>
<snapshot-jmx>${health_snapshot_jmx}</snapshot-jmx>
<mail-to>${email}</mail-to>
<mail-from>${email_from}</mail-from>
<!-- <profile-time>60s</profile-time> -->
Expand Down
24 changes: 24 additions & 0 deletions modules/resin/src/com/caucho/admin/action/PdfReportAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public class PdfReportAction implements AdminAction
private String _mailFrom;

private boolean _isSnapshot;
private boolean _isSnapshotHeapDump = true;
private long _profileTime;
private long _profileTick;

Expand All @@ -73,6 +74,7 @@ public class PdfReportAction implements AdminAction
private Path _logPath;
private String _fileName;
private Session _session;
private boolean _isSnapshotJmx;

public String getPath()
{
Expand Down Expand Up @@ -124,6 +126,26 @@ public void setSnapshot(boolean isSnapshot)
_isSnapshot = isSnapshot;
}

public void setSnapshotHeapDump(boolean isHeapDump)
{
_isSnapshotHeapDump = isHeapDump;
}

public boolean isSnapshotHeapDump()
{
return _isSnapshotHeapDump;
}

public void setSnapshotJmx(boolean isJmx)
{
_isSnapshotJmx = isJmx;
}

public boolean isSnapshotJmx()
{
return _isSnapshotJmx;
}

public void setWatchdog(boolean isWatchdog)
{
_isWatchdog = isWatchdog;
Expand Down Expand Up @@ -385,6 +407,8 @@ public PdfReportActionResult execute()
env.setGlobalValue("period", env.wrapJava(calculatePeriod() / 1000));

env.setGlobalValue("g_is_snapshot", env.wrapJava(isSnapshot()));
env.setGlobalValue("g_is_snapshot_heapdump", env.wrapJava(isSnapshotHeapDump()));
env.setGlobalValue("g_is_snapshot_jmx", env.wrapJava(isSnapshotJmx()));
env.setGlobalValue("g_is_watchdog", env.wrapJava(isWatchdog()));

if (getProfileTime() > 0) {
Expand Down
17 changes: 16 additions & 1 deletion modules/resin/src/com/caucho/ejb/EJBServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public class EJBServer
private String _startupMode;

private long _transactionTimeout = 0;
private boolean _isScanPersistenceXml = true;

/**
* Create a server with the given prefix name.
Expand Down Expand Up @@ -482,6 +483,16 @@ public static EJBServer getLocal()
{
return _localServer.get();
}

private boolean isScanPersistenceXml()
{
return _isScanPersistenceXml;
}

public void setScanPersistenceXml(boolean isScan)
{
_isScanPersistenceXml = isScan;
}

/**
* Initialize the container.
Expand All @@ -494,7 +505,11 @@ public void init()

// _ejbContainer.start();

PersistenceManager persistenceManager = PersistenceManager.create();
PersistenceManager persistenceManager = null;

if (isScanPersistenceXml()) {
persistenceManager = PersistenceManager.create();
}

if (persistenceManager != null)
persistenceManager.addPersistenceUnitDefault(_jpaProgram);
Expand Down
10 changes: 8 additions & 2 deletions php/admin/pdf-gen.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
global $g_title;
global $g_is_watchdog;
global $g_is_snapshot;
global $g_is_snapshot_heapdump;
global $g_is_snapshot_jmx;
global $profile_time;
global $period;
global $g_period;
Expand Down Expand Up @@ -50,8 +52,12 @@ function get_param($value, $name, $default_value)
if ($snapshot) {
$snapshot->snapshotThreadDump();
$snapshot->snapshotScoreboards();
$snapshot->snapshotHeap();
$snapshot->snapshotJmx();
if ($g_is_snapshot_heapdump) {
$snapshot->snapshotHeap();
}
if ($g_is_snapshot_jms) {
$snapshot->snapshotJmx();
}

if ($profile_time || $_REQUEST["profile_time"]) {

Expand Down
6 changes: 6 additions & 0 deletions resin-doc/changes/changes.xtp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@

<s2 title="4.0.42 - in progress">
<ul>
<li>ejb: added scan-persistence-xml to &lt;ejb-server> to allow disabling of persistence-unit scanning (#4908)</li>
<li>ssl: update openssl option processing. Update SSL_free/SSL_new</li>
<li>health: add snapshot-jmx and snapshot-heap-dump to avoid issues on weekly reports (#5495, rep by ssbbartgroup)</li>
<li>resin.sh: chdir to $RESIN_HOME before starting (#5668, rep by balaiitm)</li>
<li>apache: NPE issues with Apache locking (#5747, #5744, rep by vicsanca, ssmax)</li>
<li>apache: configure/make issues with Apache 24</li>
<li>jni: add loading of classes/native/*.so (or native/*.so in a jar) (#5760, rep by William Damage)</li>
<li>openssl: SSL field (ssl_sock) value was being cleared by std.c (#5815, rep by Nick Stephens, Sarah Gillespie)</li>
<li>openssl: SSLv3 is now disabled by default (#5819)</li>
Expand Down

0 comments on commit e69f32f

Please sign in to comment.