Issue Details (XML | Word | Printable)

Key: GLASSFISH-13873
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: marina vatkina
Reporter: easarina
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
glassfish

If TS resource had been changed, tables are not created after server restart

Created: 07/Oct/10 05:13 PM   Updated: 15/Apr/11 11:15 AM
Component/s: ejb_container
Affects Version/s: 3.1
Fix Version/s: future release

Time Tracking:
Not Specified

File Attachments: 1. Text File server.log (354 kB) 07/Oct/10 05:17 PM - easarina
2. File timersession.ear (7 kB) 07/Oct/10 05:17 PM - easarina

Environment:

Operating System: All
Platform: All


Issuezilla Id: 13,873
Tags: 3_1-exclude 3_1-release-note-added 3_1-release-notes
Participants: easarina, marina vatkina, Paul Davies and Scott Fordin


 Description  « Hide

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.



easarina added a comment - 07/Oct/10 05:17 PM

Created an attachment (id=5096)
timersession.ear


easarina added a comment - 07/Oct/10 05:17 PM

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


marina vatkina added a comment - 07/Oct/10 05:18 PM

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


easarina added a comment - 07/Oct/10 05:55 PM

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.


marina vatkina added a comment - 07/Oct/10 06:04 PM

You need to restart the DAS as well


easarina added a comment - 07/Oct/10 08:19 PM

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


marina vatkina added a comment - 08/Oct/10 02:48 PM

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...


easarina added a comment - 08/Oct/10 05:14 PM

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.


marina vatkina added a comment - 17/Nov/10 02:00 PM

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


Paul Davies added a comment - 17/Nov/10 02:05 PM

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


Scott Fordin added a comment - 15/Apr/11 11:15 AM

Added issue to 3.1 Release Notes.