How to delete JNDI Name in Glassfish? [ RESOLVED ]

If that(delete-jndi-resource sample_jndi_resource) command d'ont resolve use this:

Access http://localhost:4848/management/domain/resources/jdbc-resource/ and click in delete button.

To Start JavaDB inside glassfish[ RESOLVED ]

Before go to glassfish directory for line command.

step 1. First you need to start glassfish server with this command:
- asadmin start-domain domain1
...
Waiting for domain1 to start ...
Successfully started the domain : domain1
domain Location: /Users/marcelomariano/Mariano/java/glassfish/glassfish/domains/domain1
Log File: /Users/marcelomariano/Mariano/java/glassfish/glassfish/domains/domain1/logs/server.log
Admin Port: 4848
Command start-domain executed successfully.
...

step 2. After you need to start the database with this command:(PS: server need be started)
- as-install/bin/asadmin start-database --dbhome as-install-parent/javadb
...
sudo ./asadmin start-database --dbhome /Users/marcelomariano/Mariano/java/glassfish/glassfish3/javadb
Starting database in Network Server mode on host 0.0.0.0 and port 1527.
--------- Informa??es sobre o Derby Network Server ---------
Vers?o: CSS10060/10.6.2.1 - (999685) Build: 999685 ID do Produto DRDA: CSS10060
-- listing properties --
derby.drda.traceDirectory=/Users/marcelomariano/Mariano/java/gl...
derby.drda.maxThreads=0
derby.drda.sslMode=off
derby.drda.keepAlive=true
derby.drda.minThreads=0
derby.drda.portNumber=1527
derby.drda.logConnections=false
derby.drda.timeSlice=0
derby.drda.startNetworkServer=false
derby.drda.host=0.0.0.0
derby.drda.traceAll=false
------------------ Informa??es sobre Java ------------------
Vers?o do Java: 1.6.0_26
Fornecedor do Java: Apple Inc.
Diret?rio base do Java: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Caminho de classes do Java: /Users/marcelomariano/Mariano/java/glassfish/glassfish3/glassfish/modules/admin-cli.jar:/Users/marcelomariano/Mariano/java/glassfish/glassfish3/glassfish/modules/common-util.jar:/Users/marcelomariano/Mariano/java/glassfish/glassfish3/glassfish/modules/glassfish-api.jar:/Users/marcelomariano/Mariano/java/glassfish/glassfish3/glassfish/modules/glassfish-corba-asm.jar:/Users/marcelomariano/Mariano/java/glassfish/glassfish3/glassfish/modules/glassfish-corba-codegen.jar:/Users/marcelomariano/Mariano/java/glassfish/glassfish3/glassfish/modules/glassfish-corba-csiv2-idl.jar:/Users/marcelomariano/Mariano/java/glassfish/glassfish3/glassfish/modules/glassfish-corba-internal-api.jar:/Users/marcelomariano/Mariano/java/glassfish/glassfish3/glassfish/modules/glassfish-corba-newtimer.jar:/Users/marcelomariano/Mariano/java/glassfish/glassfish3/glassfish/modules/glassfish-corba-omgapi.jar:/Users/marcelomariano/Mariano/java/glassfish/glassfish3/glassfish/modules/glassfish-corba-orb.jar:/Users/marcelomariano/Mariano/java/glassfish/glassfish3/glassfish/modules/glassfish-corba-orbgeneric.jar:/Users/marcelomariano/Mariano/java/glassfish/glassfish3/glassfish/modules/glassfish-ee-api.jar:/Users/marcelomariano/Mariano/java/glassfish/glassfish3/glassfish/modules/glassfish-extra-jre-packages.jar:/Users/marcelomariano/Mariano/java/glassfish/glassfish3/glassfish/modules/glassfish-mbeanserver.jar:/Users/marcelomariano/Mariano/java/glassfish/glassfish3/glassfish/modules/glassfish-naming.jar:/Users/marcelomariano/Mariano/java/glassfish/glassfish3/glassfish/modules/glassfish-oracle-jdbc-driver-packages.jar:/Users/marcelomariano/Mariano/java/glassfish/glassfish3/glassfish/modules/glassfish-registration.jar:/Users/marcelomariano/Mariano/java/glassfish/glassfish3/glassfish/modules/glassfish.jar:/Users/marcelomariano/Mariano/java/glassfish/glassfish3/javadb/lib/derby.jar:/Users/marcelomariano/Mariano/java/glassfish/glassfish3/javadb/lib/derbytools.jar:/Users/marcelomariano/Mariano/java/glassfish/glassfish3/javadb/lib/derbynet.jar:/Users/marcelomariano/Mariano/java/glassfish/glassfish3/javadb/lib/derbyclient.jar
Nome do Sistema Operacional: Mac OS X
Arquitetura do Sistema Operacional: x86_64
Vers?o do Sistema Operacional: 10.6.8
Nome do usu?rio Java: root
Diret?rio base do usu?rio Java: /Users/marcelomariano
Diret?rio do usu?rio Java: /Users/marcelomariano/Mariano/java/glassfish/glassfish3/bin
java.specification.name: Java Platform API Specification
java.specification.version: 1.6
java.runtime.version: 1.6.0_26-b03-384-10M3425
---------------- Informa??es sobre o Derby -----------------
JRE - JDBC: Java SE 6 - JDBC 4.0
[/Users/marcelomariano/Mariano/java/glassfish/glassfish3/javadb/lib/derby.jar] 10.6.2.1 - (999685)
[/Users/marcelomariano/Mariano/java/glassfish/glassfish3/javadb/lib/derbytools.jar] 10.6.2.1 - (999685)
[/Users/marcelomariano/Mariano/java/glassfish/glassfish3/javadb/lib/derbynet.jar] 10.6.2.1 - (999685)
[/Users/marcelomariano/Mariano/java/glassfish/glassfish3/javadb/lib/derbyclient.jar] 10.6.2.1 - (999685)
------------------------------------------------------
---------------- Informa??es sobre o Idioma ----------------
Idioma atual : [portugu?s/Brasil [pt_BR]]
Encontrado suporte para o idioma: [cs]
vers?o: 10.6.2.1 - (999685)
Encontrado suporte para o idioma: [de_DE]
vers?o: 10.6.2.1 - (999685)
Encontrado suporte para o idioma: [es]
vers?o: 10.6.2.1 - (999685)
Encontrado suporte para o idioma: [fr]
vers?o: 10.6.2.1 - (999685)
Encontrado suporte para o idioma: [hu]
vers?o: 10.6.2.1 - (999685)
Encontrado suporte para o idioma: [it]
vers?o: 10.6.2.1 - (999685)
Encontrado suporte para o idioma: [ja_JP]
vers?o: 10.6.2.1 - (999685)
Encontrado suporte para o idioma: [ko_KR]
vers?o: 10.6.2.1 - (999685)
Encontrado suporte para o idioma: [pl]
vers?o: 10.6.2.1 - (999685)
Encontrado suporte para o idioma: [pt_BR]
vers?o: 10.6.2.1 - (999685)
Encontrado suporte para o idioma: [ru]
vers?o: 10.6.2.1 - (999685)
Encontrado suporte para o idioma: [zh_CN]
vers?o: 10.6.2.1 - (999685)
Encontrado suporte para o idioma: [zh_TW]
vers?o: 10.6.2.1 - (999685)
------------------------------------------------------

Starting database in the background.
Log redirected to /Users/marcelomariano/Mariano/java/glassfish/glassfish3/javadb/derby.log.
Command start-database executed successfully.
...

step 3. Stop database whit this command:
- asadmin stop-database

step 4. Stop server whit this command:
- asadmin stop-domain domain1

Simple and that's It.

Android Emulator do not start?[ SOLVED]

I pass for this problem today..

It's simple.. We need just delete the AVD (Virtual Device) from your application and create it again.

How to get values in android AlertDialog[ RESOLVED ]

It's simple.. look this code:

private void openDialogLogin(){

LayoutInflater factory = LayoutInflater.from(Jira3Layer.this);

final View textEntryView = factory.inflate(R.layout.alert_dialog_text_entry, null);

AlertDialog.Builder loginPopup = new AlertDialog.Builder(Jira3Layer.this);

loginPopup.setTitle("Login")

.setView(textEntryView)

.setPositiveButton(R.string.login,new DialogInterface.OnClickListener() {

public void onClick(DialogInterface dialog, int whichButton) {

// HERE IS THE GREATE SOLUTION FOR ALERTDIALOG VALUES.

EditText username = (EditText) textEntryView.findViewById(R.id.username_edit);

EditText password = (EditText) textEntryView.findViewById(R.id.password_edit);

Toast.makeText(YourClass.this, "Values: "+username.getText()+" "+password.getText(), Toast.LENGTH_SHORT).show();


}

})

.setNegativeButton(R.string.calcel,

new DialogInterface.OnClickListener() {

public void onClick(DialogInterface dialog, int whichButton) {

dialog.dismiss();

Toast.makeText(Jira3Layer.this,"open login", Toast.LENGTH_SHORT).show();


}

}).show();

}