[GLASSFISH-13873] If TS resource had been changed, tables are not created after server restart Created: 07/Oct/10  Updated: 15/Apr/11

Status: Open
Project: glassfish
Component/s: ejb_container
Affects Version/s: 3.1
Fix Version/s: future release

Type: Bug Priority: Major
Reporter: easarina Assignee: marina vatkina
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: Text File server.log     File timersession.ear    
Issuezilla Id: 13,873
Tags: 3_1-exclude, 3_1-release-note-added, 3_1-release-notes

 Description   

Build 23 10/07. Solaris 10 Sparc. Installed thid build on one machine. Created a
cluster with two instances. Then started a cluster. After that executed:
#!/usr/bin/perl
require "./conf.pl";

$out=`$S1AS_HOME/bin/asadmin start-database`;
print $out;
$out=`$S1AS_HOME/bin/asadmin stop-cluster c1`;
print $out;
$out=`$S1AS_HOME/bin/asadmin set
configs.config.c1-config.ejb-container.ejb-timer-service.timer-datasource=jdbc/__default`;
print $out;
$out=`$S1AS_HOME/bin/asadmin create-resource-ref --target c1 jdbc/__default`;
print $out;
$out=`$S1AS_HOME/bin/asadmin start-cluster c1`;
print $out;
$out=`$S1AS_HOME/bin/asadmin list-instances`;
print $out;
$out=`$S1AS_HOME/bin/asadmin deploy --target c1 --retrieve . ./timersession.ear`;
print $out;
$out=`$S1AS_HOME/bin/appclient -targetserver localhost:13700 -client
./timersessionClient.jar`;
print $out;
================================================================

The appclient was executed successfully.

Then I've reinstalled everything and executed such sequence of the commands:
===================================================
#!/usr/bin/perl
require "./conf.pl";

$out=`$S1AS_HOME/bin/asadmin start-database`;
print $out;
$out=`$S1AS_HOME/bin/asadmin deploy --target c1 --retrieve . ./timersession.ear`;
print $out;
$out=`$S1AS_HOME/bin/appclient -targetserver localhost:13700 -client
./timersessionClient.jar`;
print $out;
$out=`$S1AS_HOME/bin/asadmin undeploy --target c1 timersession`;
print $out;
$out=`$S1AS_HOME/bin/asadmin stop-cluster c1`;
print $out;
$out=`$S1AS_HOME/bin/asadmin set
configs.config.c1-config.ejb-container.ejb-timer-service.timer-datasource=jdbc/__default`;
print $out;
$out=`$S1AS_HOME/bin/asadmin create-resource-ref --target c1 jdbc/__default`;
print $out;
$out=`$S1AS_HOME/bin/asadmin start-cluster c1`;
print $out;
$out=`$S1AS_HOME/bin/asadmin list-instances`;
print $out;
$out=`$S1AS_HOME/bin/asadmin deploy --target c1 --retrieve . ./timersession.ear`;
print $out;
$out=`$S1AS_HOME/bin/appclient -targetserver localhost:13700 -client
./timersessionClient.jar`;
print $out;
================================================

In this case not only seconf execution of the appclient totally failed, but also
second deployment failed.

I believe, if once TS did not start successfully and it is not running, then
during next invoke, has be to cleaned everything and TS should be started again.
I've restarted cluster, db, domain, tried to undeploy an app and deploy it
again, but it did not help. So only a full uninstall helps to clean everything.
I've attached timersession.ear and in1 server.log.



 Comments   
Comment by easarina [ 07/Oct/10 ]

Created an attachment (id=5096)
timersession.ear

Comment by easarina [ 07/Oct/10 ]

Created an attachment (id=5097)
in1 server.log

Comment by marina vatkina [ 07/Oct/10 ]

As this would be something we didn't provide before, making it an RFE for the
next release.

Comment by easarina [ 07/Oct/10 ]

I believe, that for this release has to be provided at least a work around. I.e.
if first time TS did not start, how to clean everything and make it start next
time without reinstalling the glassfish.

Comment by marina vatkina [ 07/Oct/10 ]

You need to restart the DAS as well

Comment by easarina [ 07/Oct/10 ]

As I've wrote I've restarted DAS, cluster, DB. But it did not help.

Comment by marina vatkina [ 08/Oct/10 ]

This is what's going on:

The 1st time you started, TS was (absolutely fine) deployed to jdbc/__TimerPool,
so after restart, even though the code figured out that it's a different
resource, the file marker left behind said it's a load, not a deploy.

May be the file should contain the last (all?) resources TS was deployed to...

Comment by easarina [ 08/Oct/10 ]

When was added glassfish3/glassfish/domains/domain1/generated/ejb-timer-service-
app, the second deployment/appclient execution were OK. I.e. such sequence of
commands worked:
===================================================
#!/usr/bin/perl
require "./conf.pl";

$out=`$S1AS_HOME/bin/asadmin start-database`;
print $out;
$out=`$S1AS_HOME/bin/asadmin deploy --target c1 --retrieve .
./timersession.ear`;
print $out;
$out=`$S1AS_HOME/bin/appclient -targetserver localhost:13700 -client
./timersessionClient.jar`;
print $out;
$out=`$S1AS_HOME/bin/asadmin undeploy --target c1 timersession`;
print $out;
$out=`rm -rf $S1AS_HOME/domains/domain1/generated/ejb-timer-service-app`;
print $out;
$out=`$S1AS_HOME/bin/asadmin stop-cluster c1`;
print $out;
$out=`$S1AS_HOME/bin/asadmin stop-domain`;
print $out;
$out=`$S1AS_HOME/bin/asadmin start-domain`;
print $out;
$out=`$S1AS_HOME/bin/asadmin set
configs.config.c1-config.ejb-container.ejb-timer-service.timer-
datasource=jdbc/__default`;
print $out;
$out=`$S1AS_HOME/bin/asadmin create-resource-ref --target c1 jdbc/__default`;
print $out;
$out=`$S1AS_HOME/bin/asadmin start-cluster c1`;
print $out;
$out=`$S1AS_HOME/bin/asadmin list-instances`;
print $out;
$out=`$S1AS_HOME/bin/asadmin deploy --target c1 --retrieve .
./timersession.ear`;
print $out;
$out=`$S1AS_HOME/bin/appclient -targetserver localhost:13700 -client
./timersessionClient.jar`;
print $out;
========================================================

But it doesn't work without stop-domain/start-domain.

I believe this sequence of the commands has to work without a domain restating.

Comment by marina vatkina [ 17/Nov/10 ]

Let's RN for this release that if the EJB Timer resource was changed after the
EJB Timer Service was started on a previous resource, a) DAS needs to be
restarted if any automatic timers are to be deployed, and b) unless the EJB
Timer table is created manually, the marker file
glassfish3/glassfish/domains/domain1/generated/ejb-timer-service-app needs to be
removed as well.

Please reassign it back to ejb-container after it is documented

Comment by Paul Davies [ 17/Nov/10 ]

Added 3.1-release-notes keyword to ensure that this issue is documented in the
RN and reset the subcomponent and owner.

Comment by Scott Fordin [ 15/Apr/11 ]

Added issue to 3.1 Release Notes.

Generated at Sun Sep 25 00:19:32 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.